I am getting an error in my Rails project.
THe situation is that I have moved to a new computer; all worked fine on
the old, but fails on the new. It happens when trying to build the
database, and I get this error:
database configuration specifies nonexistent jdbcpostgresql adapter
As you can see I am using JRuby with PostgreSQL. I am on Rails 3.2.11,
which is a step up from what I was using before, 3.2.2, think, so this
could be the problem.
From my gemfile:
gem ‘postgresql’, :platform => :ruby
platforms :jruby do
gem ‘jruby-openssl’
gem ‘activerecord-jdbcpostgresql-adapter’
end
I have done “bundle install” and “bundle update” and “bundle exec”, and
these report back:
Using activerecord (3.2.11)
Using activerecord-jdbc-adapter (1.2.5)
Using jdbc-postgres (9.2.1002)
Using activerecord-jdbcpostgresql-adapter (1.2.5)
Using activeresource (3.2.11)
… but otherwise no help. I have also tried “gem install
activerecord-jdbcpostgresql-adapter”, which happily completes, but does
not help.
My database.yml looks like this:
login: &login
adapter: jdbcpostgresql
encoding: unicode
host: localhost
username: postgres
password: password
development:
<<: *login
database: f2db_dev
test:
<<: *login
database: f2db_test
production:
<<: *login
database: f2db
As an experiment, I tried changing the adapter name in database.yml, and
that generates a very different error:
Please install the jdbcpostgresql2 adapter: gem install activerecord-jdbcpostgresql2-adapter
(no such file to load –
active_record/connection_adapters/jdbcpostgresql2_adapter)
This makes me think that it can find the adapter (when I give it the
right name), so why does it think it does not exist?
Any advise appreciated.