This project is archived and is in readonly mode.
Accessing ActiveRecord::ConnectionAdapters::AbstractAdapter from console raises exception
Reported by Hongli Lai | April 24th, 2010 @ 01:59 PM
This is a new, empty Rails 3 app. My database.yml looks like this:
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
Accessing ActiveRecord::ConnectionAdapters::AbstractAdapter causes it to autoload abstract_adapter.rb, which in turn requires connection_specification.rb. That file then raises an exception for some reason.
[hongli@Minato rails3.test]$ ./script/rails console
Loading development environment (Rails 3.0.0.beta3)
irb(main):001:0> ActiveRecord::ConnectionAdapters::AbstractAdapter
NameError: undefined local variable or method `establish_connection' for ActiveRecord::Base:Class
from /Users/hongli/Projects/rails/activerecord/lib/active_record/base.rb:1141:in `method_missing'
from /Users/hongli/Projects/rails/activerecord/lib/active_record/railtie.rb:49
from /Users/hongli/Projects/rails/activesupport/lib/active_support/lazy_load_hooks.rb:14:in `instance_eval'
from /Users/hongli/Projects/rails/activesupport/lib/active_support/lazy_load_hooks.rb:14:in `run_load_hooks'
from /Users/hongli/Projects/rails/activesupport/lib/active_support/lazy_load_hooks.rb:14:in `each'
from /Users/hongli/Projects/rails/activesupport/lib/active_support/lazy_load_hooks.rb:14:in `run_load_hooks'
from /Users/hongli/Projects/rails/activerecord/lib/active_record/base.rb:2250
from /Users/hongli/Projects/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb:2
from /Users/hongli/Projects/rails/activesupport/lib/active_support/dependencies.rb:209:in `require'
from /Users/hongli/Projects/rails/activesupport/lib/active_support/dependencies.rb:209:in `require'
from /Users/hongli/Projects/rails/activesupport/lib/active_support/dependencies.rb:195:in `load_dependency'
from /Users/hongli/Projects/rails/activesupport/lib/active_support/dependencies.rb:523:in `new_constants_in'
from /Users/hongli/Projects/rails/activesupport/lib/active_support/dependencies.rb:195:in `load_dependency'
from /Users/hongli/Projects/rails/activesupport/lib/active_support/dependencies.rb:209:in `require'
from /Users/hongli/Projects/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:12
from (irb):1
Comments and changes to this ticket
-
Christian Knappskog July 6th, 2010 @ 11:33 PM
I get the same error, the plugin acts_as_tsearch is trigging it when using postgresql
-
Neeraj Singh July 7th, 2010 @ 02:01 AM
- Importance changed from to Low
It's working fine for me with rails edge.
ree-1.8.7-2010.01 > ActiveRecord::ConnectionAdapters::AbstractAdapter => ActiveRecord::ConnectionAdapters::AbstractAdapter
-
David Trasbo September 12th, 2010 @ 08:22 PM
- Assigned user set to Rohit Arondekar
I've come to the same conclusion as Neeraj, using Rails edge on 1.9.2.
This can be closed.
-
Rohit Arondekar September 13th, 2010 @ 01:49 AM
- State changed from new to invalid
Closing ticket for now, if this is still an issue just leave a comment and I'll reopen.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>