i updated from RC4 to RC5 (3.1) and everytime I do
SomeModel.all, .first, anything I get something like this
ActionView::Template::Error (undefined method `visitor’ for
#ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x00000003c9a1f0 ):
PostgreSQLAdapter or SQLiteAdapter
i’m receiving the same error with both 3.1rc4 and rc5 … the cause
appears to be with arel 2.1.5. i added gem “arel”, “2.1.4” to my gemfile
and the error went away.
Tomas R. wrote in post #1015594:
i updated from RC4 to RC5 (3.1) and everytime I do
SomeModel.all, .first, anything I get something like this
ActionView::Template::Error (undefined method `visitor’ for
#ActiveRecord::ConnectionAdapters::PostgreSQLAdapter:0x00000003c9a1f0 ):
PostgreSQLAdapter or SQLiteAdapter
so its a problem with arel 2.1.5, thanks for the tip
ryanjmclaughlin wrote in post #1015638:
same issue here…
arel 2.1.4 downgrade made everything work perfectly, thanks.
@tenderlove yanked the troublesome 2.1.5 gem:
opened 02:18AM - 09 Aug 11 UTC
closed 09:03PM - 09 Aug 11 UTC
receiving the following error with arel 2.1.5 and rails 3.1 rc4 and rc5. downgra… ding to arel 2.1.4 resolves the error.
```
NoMethodError: undefined method `visitor' for #<ActiveRecord::ConnectionAdapters::Mysql2Adapter:0x000001048b4c50>
from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/arel-2.1.5/lib/arel/tree_manager.rb:19:in `visitor'
from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/arel-2.1.5/lib/arel/tree_manager.rb:23:in `to_sql'
from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/activerecord-3.1.0.rc5/lib/active_record/relation.rb:111:in `to_a'
from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/activerecord-3.1.0.rc5/lib/active_record/relation/finder_methods.rb:370:in `find_first'
from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/activerecord-3.1.0.rc5/lib/active_record/relation/finder_methods.rb:122:in `first'
from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/activerecord-3.1.0.rc5/lib/active_record/base.rb:437:in `first'
from (irb):2
from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/railties-3.1.0.rc5/lib/rails/commands/console.rb:45:in `start'
from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/railties-3.1.0.rc5/lib/rails/commands/console.rb:8:in `start'
from /Users/cipater/.rvm/gems/ruby-1.9.2-p180@rails/gems/railties-3.1.0.rc5/lib/rails/commands.rb:40:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
```
Problem solved.