Ruby on Rails Saturday, May 26, 2012

On 26 May 2012 18:50, Prajwal B. <lists@ruby-forum.com> wrote:
> page.css("#{TABLE_DIV_ID} tr")[1..-2].each do |tr|
>      data_tds = tr.css('td').map{ |td|
>         td.text.gsub(/[$,](?=\d)/, '').gsub(/\302\240|\s/, ' ').strip
>      }
>
> first line is saying no method error 'each' do
> for nil class

Then page.css("#{TABLE_DIV_ID} tr")[1..-2] is nil

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@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.

No comments:

Post a Comment