Cannot start rails server: Please install the adapter: `gem install activerecord--adapter`

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:inblock 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:inrequire’
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:inresolve_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:inestablish_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:ininstance_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:inon_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:ininstance_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:inblock 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:inrun_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:inmethod_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:inrequire’
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:inload_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:inblock in ’
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:ininitialize’
from /home/al3xa/rails/sorcery/config.ru:1:in new' from /home/al3xa/rails/sorcery/config.ru:1:in
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:inparse_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:inapp’
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:instart’
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:inblock 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

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’

Getting the same error, did you ever get to the bottom of this?

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 frominstance_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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs