Forum: Ruby on Rails Cannot start rails server: Please install the adapter: `gem install activerecord--adapter`

Efe6e4ed1258078a62684c7c71038552?d=identicon&s=25 "Aleksandar Blagotić" <aca.blagotic@gmail.com> (Guest)
on 2012-02-20 19:17
(Received via mailing list)
My app was working sublime 'till this morning when I noticed this
strange
error when running rails server:

$ rails s
=> Booting WEBrick
=> Rails 3.2.1 application starting in development on
http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in
`require': Please install the adapter: `gem install
activerecord--adapter`
(cannot load such file -- active_record/connection_adapters/_adapter)
(LoadError)
from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in
`block in require'
from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in
`load_dependency'
from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in
`require'
from
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:48:in
`resolve_hash_connection'
from
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:39:in
`resolve_string_connection'
from
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:23:in
`spec'
from
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.2.1/lib/active_record/connection_adapters/abstract/connection_specification.rb:127:in
`establish_connection'
from
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.2.1/lib/active_record/railtie.rb:76:in
`block (2 levels) in <class:Railtie>'
from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/lazy_load_hooks.rb:36:in
`instance_eval'
from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/lazy_load_hooks.rb:36:in
`execute_hook'
from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/lazy_load_hooks.rb:26:in
`on_load'
from
/usr/lib/ruby/gems/1.9.1/gems/activerecord-3.2.1/lib/active_record/railtie.rb:74:in
`block in <class:Railtie>'
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in
`instance_exec'
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in
`run'
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:55:in
`block in run_initializers'
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in
`each'
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:54:in
`run_initializers'
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:136:in
`initialize!'
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/railtie/configurable.rb:30:in
`method_missing'
from /home/al3xa/rails/sorcery/config/environment.rb:5:in `<top
(required)>'
from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in
`require'
from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in
`block in require'
from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:236:in
`load_dependency'
from
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in
`require'
from /home/al3xa/rails/sorcery/config.ru:4:in `block in <main>'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in
`instance_eval'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:51:in
`initialize'
from /home/al3xa/rails/sorcery/config.ru:1:in `new'
from /home/al3xa/rails/sorcery/config.ru:1:in `<main>'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in
`eval'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/builder.rb:40:in
`parse_file'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:200:in
`app'
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:46:in
`app'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:301:in
`wrapped_app'
from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/server.rb:252:in
`start'
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands/server.rb:70:in
`start'
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in
`block in <top (required)>'
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in
`tap'
from
/usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:50:in
`<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'

Note that I can't replicate this bug in vanilla apps. I'm using
rubyRails
3.2.1 and ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]. FWIW,
here's my Gemfile too:

source 'https://rubygems.org'

gem 'rails', '3.2.1'

group :development, :test do
gem 'sqlite3'
gem 'annotate', :git => 'git://github.com/ctran/annotate_models.git'
gem 'rspec-rails'
end

group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'bootstrap-sass'
end

gem 'jquery-rails'

group :test do
gem 'capybara'
end

gem 'bcrypt-ruby', '~> 3.0.0'
gem 'sorcery'
8807467106ec1431074e652003aedb92?d=identicon&s=25 John O'Gara (Guest)
on 2014-06-14 11:20
(Received via mailing list)
Getting the same error, did you ever get to the bottom of this?
F7141e066d691d7f18765c1ea6389b18?d=identicon&s=25 Serguei Cambour (javix)
on 2014-06-15 10:43
(Received via mailing list)
On Monday, February 20, 2012 1:19:44 PM UTC+1, Aleksandar Blagotić
wrote:
>
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in
>
/usr/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in
> from
> `execute_hook'
> /usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/initializable.rb:30:in
> from
> from
> `instance_eval'
> from
> /usr/lib/ruby/gems/1.9.1/gems/railties-3.2.1/lib/rails/commands.rb:55:in
> Note that I can't replicate this bug in vanilla apps. I'm using rubyRails
> gem 'rspec-rails'
>
> group :test do
> gem 'capybara'
> end
>
> gem 'bcrypt-ruby', '~> 3.0.0'
> gem 'sorcery'
>
>
> Try to re-run bundle install and come back with results.
Did you run bundle update before ? As I see from your Gemfile, you did
not
specify gem versions, so may be you run in issue with some incompatible
gems.
Check your database.yml file as well to be sure that you are still usin
sqlite3 adapter, you should have something like this:

# SQLite version 3.x
#   gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
  adapter: sqlite3
  database: db/development.sqlite3
  pool: 5
  timeout: 5000
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.