Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading from Rails 3.0.9 to Rails 3.1 errors from CanCan

I have an application I am upgrading to 3.1 from Rails 3.0.9. But, I am getting a syntax error or something. It reads:

SyntaxError in BooksController#index

c:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.1.0/lib/active_record/attribute_methods/read.rb:91: syntax error, unexpected keyword_end c:/Ruby192/lib/ruby/gems/1.9.1/gems/activerecord-3.1.0/lib/active_record/attribute_methods/read.rb:93: syntax error, unexpected $end, expecting keyword_end

Rails.root: c:/Users/Travis/My Documents/Aptana Studio 3 Workspace/clicknslide

Application Trace | Framework Trace | Full Trace

app/models/user.rb:11:in `admin?'

app/models/ability.rb:8:in `initialize'

Any ideas?

Note: All controllers worked fine in 3.0.9

like image 353
Travis Pessetto Avatar asked Sep 07 '11 01:09

Travis Pessetto


1 Answers

Just upgrade to latest version of mysql2 gem. In my case it is 0.3.7 now.

like image 74
Antiarchitect Avatar answered Nov 11 '22 01:11

Antiarchitect