# Exception occurred during reader method compilation.?

**URL:** <https://www.ruby-forum.com/t/exception-occurred-during-reader-method-compilation/168267>\
**Category:** Rails\
**Created:** [May 18, 2009, 11:14pm UTC](https://www.ruby-forum.com/t/exception-occurred-during-reader-method-compilation/168267 "2009-05-18T23:14:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![morgan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/0ea827/32.png) [@morgan](https://www.ruby-forum.com/u/morgan)\
**Post date:** [May 18, 2009, 11:14pm UTC](https://www.ruby-forum.com/t/exception-occurred-during-reader-method-compilation/168267/1 "2009-05-18T23:14:27Z")

</div>

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  
^

---

<div class="post-metadata">

**Author:** ![morgan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/0ea827/32.png) [@morgan](https://www.ruby-forum.com/u/morgan)\
**Post date:** [May 19, 2009, 9:28am UTC](https://www.ruby-forum.com/t/exception-occurred-during-reader-method-compilation/168267/2 "2009-05-19T09:28:07Z")

</div>

On May 18, 10:14 pm, Morgan M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
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
