Ruby on Rails Friday, April 1, 2011

Sorry, missed the nil part. What Colin said below is correct. Try that first.

B.

Sent from my iPhone

On Apr 1, 2011, at 2:24 AM, Colin Law <clanlaw@googlemail.com> wrote:

> On 1 April 2011 08:16, Manny 777 <lists@ruby-forum.com> wrote:
>> No no, the exactly error is "undefined method `sequence' for
>> nil:NilClass".
>>
>> It looks I am getting the database object in var "high", but I can't to
>> get individual items from this object (like "sequence" or "name"). When
>> I am trying to print the sequence (puts high.sequence), I am getting
>> error "undefined method `sequence' for nil:NilClass".
>
>
> That is not what you said the error was initially.
> High must be nil. Try surrounding the code by if !high.nil? (or just
> if high). That should make the error go away. Then you can work out
> why high 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.
>

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