[Rails] Re: Problem with displaying my XML response from API in view
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...@googlemail.com> wrote:
> On 15 January 2011 13:39, Tim <tim.jakobs...@gmail.com> 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@googlegroups.com.
> > 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@googlegroups.com.
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home