Skip to content

Instantly share code, notes, and snippets.

@rymai
Created August 12, 2011 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rymai/1142414 to your computer and use it in GitHub Desktop.
Save rymai/1142414 to your computer and use it in GitHub Desktop.
Can't call the lower SQL function
# https://github.com/ernie/squeel/issues/42
NoMethodError: undefined method `with_connection' for ActiveRecord::Base:Class
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/rails-d9d78d4165d1/activerecord/lib/active_record/base.rb:1082:in `method_missing'
from /Users/remy/my_project/vendor/ruby/1.9.1/gems/arel-2.2.0/lib/arel/visitors/to_sql.rb:16:in `accept'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/base.rb:85:in `quote'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/predicate_visitor.rb:342:in `quote_for_node'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/predicate_visitor.rb:101:in `visit_Squeel_Nodes_Predicate'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/base.rb:97:in `visit'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/predicate_visitor.rb:43:in `block in visit_Array'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/predicate_visitor.rb:43:in `map'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/predicate_visitor.rb:43:in `visit_Array'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/base.rb:97:in `visit'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/visitors/base.rb:26:in `accept'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/squeel-788d71821d5b/lib/squeel/adapters/active_record/relation.rb:90:in `build_arel'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/rails-d9d78d4165d1/activerecord/lib/active_record/relation/query_methods.rb:167:in `arel'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/rails-d9d78d4165d1/activerecord/lib/active_record/relation.rb:111:in `to_a'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/rails-d9d78d4165d1/activerecord/lib/active_record/relation/finder_methods.rb:155:in `all'
from (irb):2
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/rails-d9d78d4165d1/railties/lib/rails/commands/console.rb:45:in `start'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/rails-d9d78d4165d1/railties/lib/rails/commands/console.rb:8:in `start'
from /Users/remy/my_project/vendor/ruby/1.9.1/bundler/gems/rails-d9d78d4165d1/railties/lib/rails/commands.rb:40:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment