Hi I cant seem to figure out this problem. Im using Nokogiri to connect to an API and parse the XML response. I am then trying to display it in my view. I can se the data in my Terminal when I do some debugging on the XML object but cant seem to get it to the view. I have pasted some of the code here http://refactormycode.com/codes/1567-problem-with-passing-xml-from-api-to-view Please all help is appreciated. Thanks!! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Jan-14 10:01 UTC
Re: Problem with displaying my XML response from API in view
On Jan 13, 8:51 pm, Tim <tim.jakobs...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi I cant seem to figure out this problem. Im using Nokogiri to > connect to an API and parse the XML response. I am then trying to > display it in my view. I can se the data in my Terminal when I do some > debugging on the XML object but cant seem to get it to the view. I > have pasted some of the code herehttp://refactormycode.com/codes/1567-problem-with-passing-xml-from-ap... > Please all help is appreciated. > Thanks!!So, what happens when you try and access view this page in your browser ? have you verified what @news contains ? Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jan 14, 11:01 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jan 13, 8:51 pm, Tim <tim.jakobs...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi I cant seem to figure out this problem. Im using Nokogiri to > > connect to an API and parse the XML response. I am then trying to > > display it in my view. I can se the data in my Terminal when I do some > > debugging on the XML object but cant seem to get it to the view. I > > have pasted some of the code herehttp://refactormycode.com/codes/1567-problem-with-passing-xml-from-ap... > > Please all help is appreciated. > > Thanks!! > > So, what happens when you try and access view this page in your > browser ? have you verified what @news contains ? > > FredHi Fred! I did some output on the @news object in my view and I do get some console output of the xml response but in the browser its empty. How do you do some descent debugging on objects in Rails 3?! First I did some good old puts and then I merely did <%= @news %>. So to round it up. It seems though as @news contains the xml but I cant display it in the browser. Also I cant see the <li> for some unexplained reason. When I debug in the browser the DOM stops at <ul id="news"> Feeling a bit confused about this:) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2011-Jan-14 12:00 UTC
Re: Re: Problem with displaying my XML response from API in view
On 14 January 2011 11:33, Tim <tim.jakobsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Jan 14, 11:01 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: >> On Jan 13, 8:51 pm, Tim <tim.jakobs...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> > Hi I cant seem to figure out this problem. Im using Nokogiri to >> > connect to an API and parse the XML response. I am then trying to >> > display it in my view. I can se the data in my Terminal when I do some >> > debugging on the XML object but cant seem to get it to the view. I >> > have pasted some of the code herehttp://refactormycode.com/codes/1567-problem-with-passing-xml-from-ap... >> > Please all help is appreciated. >> > Thanks!! >> >> So, what happens when you try and access view this page in your >> browser ? have you verified what @news contains ? >> >> Fred > > Hi Fred! > I did some output on the @news object in my view and I do get some > console output of the xml response but in the browser its empty. How > do you do some descent debugging on objects in Rails 3?! First I did > some good old puts and then I merely did <%= @news %>. So to round it > up. It seems though as @news contains the xml but I cant display it in > the browser. Also I cant see the <li> for some unexplained reason. > When I debug in the browser the DOM stops at <ul id="news"> > Feeling a bit confused about this:)You can use ruby-debug to break into the code (model, controller or view) in order to inspect data. See the Rails Guide on debugging for how to do this, and other tips for debugging. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Has anyone else any feedback to give me on this?! I still havent progressed in the matter. Really frustrating. Thanks in advance!! Regards On 14 Jan, 13:00, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 14 January 2011 11:33, Tim <tim.jakobs...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > On Jan 14, 11:01 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > > wrote: > >> On Jan 13, 8:51 pm, Tim <tim.jakobs...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> > Hi I cant seem to figure out this problem. Im using Nokogiri to > >> > connect to an API and parse the XML response. I am then trying to > >> > display it in my view. I can se the data in my Terminal when I do some > >> > debugging on the XML object but cant seem to get it to the view. I > >> > have pasted some of the code herehttp://refactormycode.com/codes/1567-problem-with-passing-xml-from-ap... > >> > Please all help is appreciated. > >> > Thanks!! > > >> So, what happens when you try and access view this page in your > >> browser ? have you verified what @news contains ? > > >> Fred > > > Hi Fred! > > I did some output on the @news object in my view and I do get some > > console output of the xml response but in the browser its empty. How > > do you do some descent debugging on objects in Rails 3?! First I did > > some good old puts and then I merely did <%= @news %>. So to round it > > up. It seems though as @news contains the xml but I cant display it in > > the browser. Also I cant see the <li> for some unexplained reason. > > When I debug in the browser the DOM stops at <ul id="news"> > > Feeling a bit confused about this:) > > You can use ruby-debug to break into the code (model, controller or > view) in order to inspect data. See the Rails Guide on debugging for > how to do this, and other tips for debugging. > > Colin-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
John Maxwell
2011-Jan-15 11:07 UTC
Re: Problem with displaying my XML response from API in view
Have you tried doing: raise @news.to_yaml In the controller and seeing that that brings? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hmm I did as you said John but Im just getting an undefined method `to_yaml='' for nil:NilClass. Is my object empty?! is that what happens?? Thanks?! On Jan 15, 12:07 pm, John Maxwell <jgwmaxw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Have you tried doing: > > raise @news.to_yaml > > In the controller and seeing that that brings?-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2011-Jan-15 12:21 UTC
Re: Re: Problem with displaying my XML response from API in view
On 15 January 2011 10:02, Tim <tim.jakobsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Has anyone else any feedback to give me on this?! I still havent > progressed in the matter. Really frustrating. Thanks in advance!!So what did you learn from debugging it? Colin> Regards > > On 14 Jan, 13:00, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> On 14 January 2011 11:33, Tim <tim.jakobs...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> >> >> >> >> >> >> > On Jan 14, 11:01 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> > wrote: >> >> On Jan 13, 8:51 pm, Tim <tim.jakobs...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> >> > Hi I cant seem to figure out this problem. Im using Nokogiri to >> >> > connect to an API and parse the XML response. I am then trying to >> >> > display it in my view. I can se the data in my Terminal when I do some >> >> > debugging on the XML object but cant seem to get it to the view. I >> >> > have pasted some of the code herehttp://refactormycode.com/codes/1567-problem-with-passing-xml-from-ap... >> >> > Please all help is appreciated. >> >> > Thanks!! >> >> >> So, what happens when you try and access view this page in your >> >> browser ? have you verified what @news contains ? >> >> >> Fred >> >> > Hi Fred! >> > I did some output on the @news object in my view and I do get some >> > console output of the xml response but in the browser its empty. How >> > do you do some descent debugging on objects in Rails 3?! First I did >> > some good old puts and then I merely did <%= @news %>. So to round it >> > up. It seems though as @news contains the xml but I cant display it in >> > the browser. Also I cant see the <li> for some unexplained reason. >> > When I debug in the browser the DOM stops at <ul id="news"> >> > Feeling a bit confused about this:) >> >> You can use ruby-debug to break into the code (model, controller or >> view) in order to inspect data. See the Rails Guide on debugging for >> how to do this, and other tips for debugging. >> >> Colin > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> So what did you learn from debugging it? > > Colin >Well Colin Im a bit confused. I had some problems with installing the ruby-debug as Im using Rails 3. So finally I gave up with that. But when I did puts doc.to_s I get the xml in my console so I have it there. But the line after where I do this: @news = doc.css(''news'').map do |n| I tried to do @news.to_s and that gave me nothing. Also I did raise @news.to_yaml which just game me an error. Do u have any clues on that?! Regards! -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law
2011-Jan-15 15:07 UTC
Re: Re: Problem with displaying my XML response from API in view
On 15 January 2011 13:39, Tim <tim.jakobsson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:>> So what did you learn from debugging it? >> >> Colin >> > > Well Colin Im a bit confused. I had some problems with installing the > ruby-debug as Im using Rails 3. So finally I gave up with that.Persevere. Rails 3 should be no problem. Did you follow the guide here: http://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-ruby-debug If so what problem did you have? You need to be able to break into code and inspect data and run code snippets to see what is wrong. Even if you sort out your current issue there will be another that needs the debugger. Colin> But > when I did puts doc.to_s I get the xml in my console so I have it > there. But the line after where I do this: @news = doc.css(''news'').map > do |n| > I tried to do @news.to_s and that gave me nothing. Also I did raise > @news.to_yaml which just game me an error. Do u have any clues on > that?! > > Regards! > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin! I did this in debugger mode. display @stories 1: @stories It seems as though he object is empty? As i suspected. I cant understand how it can be when I am declaring it with the doc container which should contain the api url?? Very confusing this. Im trying to invoke the debugger around this peace of code but without success debugger @stories = doc.css(".item").map do |n| Here I cant even get in to debug mode. Grateful for all your help. Thanks! On 15 Jan, 16:07, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 15 January 2011 13:39, Tim <tim.jakobs...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> So what did you learn from debugging it? > > >> Colin > > > Well Colin Im a bit confused. I had some problems with installing the > > ruby-debug as Im using Rails 3. So finally I gave up with that. > > Persevere. Rails 3 should be no problem. Did you follow the guide here:http://guides.rubyonrails.org/debugging_rails_applications.html#debug... > If so what problem did you have? You need to be able to break into > code and inspect data and run code snippets to see what is wrong. > Even if you sort out your current issue there will be another that > needs the debugger. > > Colin > > > > > But > > when I did puts doc.to_s I get the xml in my console so I have it > > there. But the line after where I do this: @news = doc.css(''news'').map > > do |n| > > I tried to do @news.to_s and that gave me nothing. Also I did raise > > @news.to_yaml which just game me an error. Do u have any clues on > > that?! > > > Regards! > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I finally managed to debug more around the @stories variable. This is an outtake from it (rdb:14) display @stories 1: @stories (rdb:14) show @stories Unknown show command @stories (rdb:14) p @stories nil (rdb:14) pp stories NameError Exception: undefined local variable or method `stories'' for #<NewsController:0x102ece778> (rdb:14) So my conclusion is from this segment of code: apiKey = ("http:// www.mysomething.com/partner/api/1_0/randomnumber/channel/290/material/list/") doc = Nokogiri::XML(open(apiKey).read) <-- here I have the xml response and all is dandy but the next line I do this: @stories = doc.css(".item").map do |n| <--here its empty. h = {} %w(header source_name summary url geo created_at type_of_media).each do |key| h[key.to_sym] = n.css(key).text end News.new(h) end How is this possible? I might be new to ruby and rails but Im feeling really lost. Any good feedback?! Thanks! On 15 Jan, 16:07, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 15 January 2011 13:39, Tim <tim.jakobs...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> So what did you learn from debugging it? > > >> Colin > > > Well Colin Im a bit confused. I had some problems with installing the > > ruby-debug as Im using Rails 3. So finally I gave up with that. > > Persevere. Rails 3 should be no problem. Did you follow the guide here:http://guides.rubyonrails.org/debugging_rails_applications.html#debug... > If so what problem did you have? You need to be able to break into > code and inspect data and run code snippets to see what is wrong. > Even if you sort out your current issue there will be another that > needs the debugger. > > Colin > > > > > But > > when I did puts doc.to_s I get the xml in my console so I have it > > there. But the line after where I do this: @news = doc.css(''news'').map > > do |n| > > I tried to do @news.to_s and that gave me nothing. Also I did raise > > @news.to_yaml which just game me an error. Do u have any clues on > > that?! > > > Regards! > > > -- > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Frederick Cheung
2011-Jan-16 21:17 UTC
Re: Problem with displaying my XML response from API in view
On Jan 16, 8:54 pm, Tim <tim.jakobs...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> How is this possible? I might be new to ruby and rails but Im feeling > really lost. Any good feedback?! > Thanks! >Are you inspecting the variable before or after it has been set? Have you tried refactoring the bit which fetches and parses the xml feed into its own class so that you can more easily play with it in the console (and test it) ? Fred> On 15 Jan, 16:07, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > > > On 15 January 2011 13:39, Tim <tim.jakobs...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > >> So what did you learn from debugging it? > > > >> Colin > > > > Well Colin Im a bit confused. I had some problems with installing the > > > ruby-debug as Im using Rails 3. So finally I gave up with that. > > > Persevere. Rails 3 should be no problem. Did you follow the guide here:http://guides.rubyonrails.org/debugging_rails_applications.html#debug... > > If so what problem did you have? You need to be able to break into > > code and inspect data and run code snippets to see what is wrong. > > Even if you sort out your current issue there will be another that > > needs the debugger. > > > Colin > > > > But > > > when I did puts doc.to_s I get the xml in my console so I have it > > > there. But the line after where I do this: @news = doc.css(''news'').map > > > do |n| > > > I tried to do @news.to_s and that gave me nothing. Also I did raise > > > @news.to_yaml which just game me an error. Do u have any clues on > > > that?! > > > > Regards! > > > > -- > > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm. > > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Fred! The bit wich fetches the xml and parses it I have done a regular puts on that many times and i did ''var local'' in debugger mode which displayed all local variables and then I got all the xml output. Before I did the debugging actually before it has been set. Im trying to do it after now as well but for some reason it has problems going in to debug mode. I do Rails s --debugger and it says that "Debugger enabled" but it doesnt get there. Do you have any feedback from the link a pasted with code on refactormycode.com? Is it something obviously wrong Im doing when declaring the variabe? Thanks in advance!> Are you inspecting the variable before or after it has been set? > Have you tried refactoring the bit which fetches and parses the xml > feed into its own class so that you can more easily play with it in > the console (and test it) ? > > Fred > > > > > On 15 Jan, 16:07, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > > On 15 January 2011 13:39, Tim <tim.jakobs...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > >> So what did you learn from debugging it? > > > > >> Colin > > > > > Well Colin Im a bit confused. I had some problems with installing the > > > > ruby-debug as Im using Rails 3. So finally I gave up with that. > > > > Persevere. Rails 3 should be no problem. Did you follow the guide here:http://guides.rubyonrails.org/debugging_rails_applications.html#debug... > > > If so what problem did you have? You need to be able to break into > > > code and inspect data and run code snippets to see what is wrong. > > > Even if you sort out your current issue there will be another that > > > needs the debugger. > > > > Colin > > > > > But > > > > when I did puts doc.to_s I get the xml in my console so I have it > > > > there. But the line after where I do this: @news = doc.css(''news'').map > > > > do |n| > > > > I tried to do @news.to_s and that gave me nothing. Also I did raise > > > > @news.to_yaml which just game me an error. Do u have any clues on > > > > that?! > > > > > Regards! > > > > > -- > > > > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > > > > To post to this group, send email to rubyonrails-talk@googlegroups.com. > > > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.