I previously asked about this on Rails-Talk and received no response.
We are testing Rails-3.1.1 against a test suite that runs green with
3.0.4. With 3.1.1 we see this error whenever a test involves SQLite:
.rvm/gems/ruby-1.8.7-p352/gems/activerecord-3.1.1/lib/active_record/
connection_adapters/abstract/connection_specification.rb:71:in
`establish_connection': Please install the sqlite3 adapter: `gem
install activerecord-sqlite3-adapter` (sqlite3 is not part of the
bundle. Add it to Gemfile.)
Nothing else has changed but the Rails version and any of its
dependencies. The Gemfile contains this:
Either formulation works with 3.0.4. Neither works with 3.1.1.
It is not possible to update sqlite3-ruby since the target system is
CentOS-5 based and SQLite on that distribution is locked at 3.3.6
which is not supported by sqlite-ruby after version 1.2.5. However,
it strikes me as unlikely that Rails / ActiveRecord would permit a
dependency on a specific adapter gem. If Rails actually does have
such a dependency then I have managed to miss any reference to that
fact in the release notes.
Is this a defect and should it be reported? If it is not a defect
then how is this situation dealt with? Is there some configuration
change required?
As far as I can tell from the build messages, the sqlite3
gem is the form sqlite3-ruby renamed. In any case it
throws the same exceptions when trying to build against
SQLite-3.3.6. There is no interest evidenced on the part
of the gem author to change this. Quite the contrary.
As I wrote originally, I am constrained by the RedHat
distribution (via CentOS) to use a version of SQLite that
the current DBMS adapters, of which I am aware, do not
support. I have an adapter that works with my version of
SQLite and I wish to continue to use it. Why does
ActiveRecord not permit it?
I would gladly get rid of SQLite altogether but the
ActiveWarehouse gem that we use to load data from our
older computer systems depends upon it for housekeeping.
I would also contemplae updating SQLite but I cannot. We
must use packages provided in the distribution or from
authorized repositories (EPEL or Rpmforge) and none
provide a more recent version than 3.6.6 for SQLite for
RHEL5.
The problem apparently lies with ActiveRecord 3.1. The
SQLite adapter exists and works with my version of SQLite.
ActiveRecord 3.1 complains about not finding it.
ActiveRecord 3.0 does not have this problem. To my mind
this is a defect.