similar to: Rescuing from REXML::ParseException

Displaying 20 results from an estimated 400 matches similar to: "Rescuing from REXML::ParseException"

2006 Feb 01
4
REXML::ParseException - but the feed IS valid
I am using Ruby feedparser and when I try to parse this feed: http://feeds.feedburner.com/Mobilecrunch I get an error: REXML::ParseException: Declarations can only occur in the doctype declaration. This feed does validate at feedvalidator.org. Any idea why it would raise an exception? Thanks, eduard -------------- next part -------------- An HTML attachment was scrubbed... URL:
2010 Jan 22
0
REXML::ParseException: Missing end tag for 'META' (got "HEAD
Hi, I am using flickr_fu gem. When I try to get photos with following flickr = Flickr.new(File.join(RAILS_ROOT, ''config'', ''flickr.yml'')) flickr.photos.search(:user_id => user_id) it gives me error like "REXML::ParseException: Missing end tag for ''META'' (got "HEAD")" I have checked the presence of flickr.yml file &
2009 Sep 11
2
Anyone know why __END__ and DATA don't work in Rails?
When writing Ruby you have the option to end the file early with __END__. Anything after the __END__ is assigned to a constant called DATA which is available within the file. I recently tried using this in Rails and it didn''t work. Instead I get an uninitialized constant exception. Anyone know why? Has it been disabled in Rails? thanks Gavin
2009 Feb 04
2
rendering error page for "Unauthorized" from before_filter
Hey all, I am writing a plugin in which I want to stop the rendering of an action with an unauthorized response if the user is not authorized to view the resource. I am using a before filter to achieve this and inside that before filter I do it like so: render :text => "Unauthorized!", :status => :unauthorized, :layout => false The status is properly set since I see the
2011 Jun 16
2
Save the results of data analysis in R
Hi everyone, I want to do data analysis using the values retrieved from a MySQL database. Is there a way to save the results of data analysis in R. [[alternative HTML version deleted]]
2008 Oct 07
7
Rails production version not accessible from other machines
Hi, I just deployed my first rails application in production mode using Capistrano and mongrel clusters. Here are the lines in my mongrel_cluster.yml file. cwd: /myrailsdeploymath/current log_file: log/mongrel.log port: "8000" environment: production address: myserver.mydomain.org id_file: tmp/pids/mongrel.pid servers: 3 My development and production machine are the same. When I run
2007 Jun 07
1
Undefined method `register'' for REXML::Encoding:Module
Has anyone seen the below error before? It appears to only occur when Puppet runs automatically (i.e. a "puppetd --test" doesn''t cause it). I have recently installed new Ruby rpms on the server and I''m guessing that I may have left out something when I built the RPMS (based on FC7 SRPM). > -----Original Message----- > From: report@melrhweb1.nmh-au
2004 Aug 20
1
Any plans to switch wxruby-swig to using rexml?
since http://nqxml.sourceforge.net/ also recommends that we switch to use rexml which is shipped with ruby? If there are plans for it but no developers, I might take it up as an exercise to learn the internals of wxruby-swig. Cheers, Phuah Yee Keat
2006 Jan 08
2
ICONV and REXML
Hi all. I''m having trouble getting REXML to play nicely with an RSS feed that uses an encoding type called WINDOWS-1250. My application works when I comment out the references to the lines that utilize the REXML library. After visiting my app and being told that Rails could not start properly, my server.log file says: FastCGI: comm with server
2008 Feb 20
2
Rails Edge ActiveSupport::TimeWithZone and Marshalled objects
Hello all, I''m trying to use the new ActiveSupport::TimeWithZone from Edge. The problem seems to be that I have a several-action process to create a Booking. This Booking is stored in the session (session[:booking] = @booking) throughout the actions until the last action is reached and the record is saved to the DB. Using TimeWithZone seems to be producing errors when trying to
2006 Jan 25
0
screenscraping using htmltools and rexml
Hi, I need to do some screen scraping and I''ve spent a couple hour getting htmltools and rexml do the right thing. Here''s the code: parser = HTMLTree::Parser.new(false, false) parser.feed(res.body) tree = parser.tree.html_node.as_rexml_document I works for one page, but for another I get "undefined method `add'' for #<HTMLTree::Element:0x37f9cc8>" in
2007 Sep 29
2
REXML - XML query only returning one (last) result
I''m really new to Ruby on Rails, and I''m trying to read an XML file with REXML. No matter what I try, I am only getting the last result returned from my query. I should be getting 365 results. Here is the code: include REXML require ''rexml/document'' require ''rexml/xpath'' class MakeFootprintController < ApplicationController def index
2008 Jan 02
3
REXML::Comment:Class
I have this field in my app where a logged in user can enter a comment, but when I click on the link bringing me to that page I get the following error message: undefined method `table_name'' for REXML::Comment:Class I am doing some encrypting that has an ''include REXML'' statement but when I comment that out I still get this error. Does anyone know where this is coming
2007 Sep 08
1
Unknown Action doesn't raise exception ?
As I am in development environment, I wrote in my config/environment.rb ActionController::Base.consider_all_requests_local = false in my application.rb, I wrote def rescue_action_in_public(exception) case exception when RoutingError, UnknownAction render :file => "#{RAILS_ROOT}/public/404.html", :status => 404 else logger.error
2007 Jul 14
1
Very basic question about REXML
Hello Everybody, I have pretty basic question abut REXML. I want to put the String "John doe" in titles array, if attribute name is equal to "93". Please see the code below. I could not find how to do it.. any help would be very appriciated. Here is the XML i am trying to parse <entrydata columnnumber="2" name="93"> <text>John
2007 Jun 07
0
Why does REXML run significantly slower in Rails
We have some code that uses REXML, that when executed outside of Rails as a standalone rb file, runs fine. Once we run the code inside of Rails, it is dog slow. I know REXML is slow, buggy, sucks, etc., but my question is what cause the performance to degrade like that. Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google
2007 Feb 07
2
Quick XPath question (REXML)
All, If I have the following (assume that xml contains a valid REXML Document and that the root of the xml is way above any <tr> elements in the document): just_rows = xml.elements["//tr[starts_with(@id, ''xdgDataRow_grid_container_'')]"] shouldn''t just_rows contain _all_ of the <tr> elements whose id attributes start_with
2009 Oct 13
0
Re: How can I parse encoded and serialized XML with REXML?
On Sep 24, 2:14 pm, Andy <andym...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > I''ve getting data like this: > > <![CDATA[a:1:{i:0;s:6:&quot;Sometext&quot;;}]]> > > I know in PHP I can unserialize and decode, but I''m not sure the best > way to do it in Rails. > > I''m already parsing the XML using REXML so I''m
2006 Jun 28
0
REXML StreamListener
Anyone ever use the REXML StreamListener in any of their rails projects before? I m trying to set it up in one of my controllers but Im cofused as to where Im supposed to set up the Handler class. thanks for the help! -Sergio -- Posted via http://www.ruby-forum.com/.
2009 Oct 13
0
Re: How can I parse encoded and serialized XML with REXML?
Not really a solution, but this has to be a classic example of PHP- programmer-bass-ackwardness. They''re already writing to an extensible serialization format (XML) but then just whack language-specific serialized data in instead. That''s right up there with the HTTP-over- SOAP-over-HTTP stuff I''ve seen floating around... --Matt Jones On Sep 24, 9:14 am, Andy