Forum: Ruby on Rails Exception occurred during reader method compilation.?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7728d3daa0e59374b1869ef024eb6ee9?d=identicon&s=25 Morgan Morgan (morgan)
on 2009-05-18 23:14
I don't get it.
or how to fix it.



Exception occurred during reader method compilation.
Maybe 11 is not a valid Ruby identifier?
compile error
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:211:
syntax error, unexpected tINTEGER
def 11; missing_attribute('11', call...
      ^
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:211:
syntax error, unexpected kEND, expecting $end
...('11'); @attributes['11']; end
                              ^
Exception occurred during reader method compilation.
Maybe 11 is not a valid Ruby identifier?
compile error
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:211:
syntax error, unexpected tINTEGER
def 11=(new_value);write_attribute('11', new_value);end
      ^
Exception occurred during reader method compilation.
Maybe 11 is not a valid Ruby identifier?
compile error
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:211:
syntax error, unexpected tINTEGER
def 11?; query_attribute('11'); end
      ^
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:211:
syntax error, unexpected kEND, expecting $end
def 11?; query_attribute('11'); end
                                   ^
Exception occurred during reader method compilation.
Maybe 12 is not a valid Ruby identifier?
compile error
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:211:
syntax error, unexpected tINTEGER
def 12; missing_attribute('12', call...
      ^
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:211:
syntax error, unexpected kEND, expecting $end
...('12'); @attributes['12']; end
                              ^
Exception occurred during reader method compilation.
Maybe 12 is not a valid Ruby identifier?
compile error
/Library/Ruby/Gems/1.8/gems/activerecord-2.2.2/lib/active_record/attribute_methods.rb:211:
syntax error, unexpected tINTEGER
def 12=(new_value);write_attribute('12', new_value);end
      ^
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-05-19 09:28
(Received via mailing list)
On May 18, 10:14 pm, Morgan Morgan <rails-mailing-l...@andreas-s.net>
wrote:
> I don't get it.
> or how to fix it.
>
> Exception occurred during reader method compilation.
> Maybe 11 is not a valid Ruby identifier?

it isn't. do you have columns of that name ?

Fred
This topic is locked and can not be replied to.