I’m using active record in a script that I’m using to parse a text file
and load a mysql database.
It had been working fine for months but we hosed something up really
well. We gem installed Rails 3.2.9 (we’ll need to gem install 3.2.10 now
to fix the SQL injection vulnerability)
F:\Websites\rsacfod-torque\lib\tasks>jruby -S 209pump.rb
ActiveRecord::AdapterNotFound: database configuration specifies
nonexistent jdbc mysql adapter
establish_connection at
f:/torquebox-2.0.3/jruby/lib/ruby/gems/1.8/gems/activerecord-3.2.9/lib/active_record/connection_adapters/abstract/connection_specification.rb:133
(root) at 209pump.rb:9
All we did was bundle install the newest version of rails for a
completely different app. But I can see this is trying to use the newest
activerecord. Is there some issue with that?
If I’m not using a Gemfile (this is a standalone script that requires
activerecord) is this the same process? Most of my Ruby/JRuby work is in
the Rails context, but this script is not.
Sorry for giving you the wrong information, Jim. I am kind of curious
though how activerecord-jdbc-adapter knows to map the request for the
mysql adapter to the respective gem. I guess support for the most
common DB’s (mysql, sqlite, etc.) are built-in.
There is an issue that has been discussed on this list about
activerecord-jdbc-adapter. As I understand it, it will be fixed soon.
Sorry for giving you the wrong information, Jim. I am kind of curious
though how activerecord-jdbc-adapter knows to map the request for the
mysql adapter to the respective gem. I guess support for the most
common DB’s (mysql, sqlite, etc.) are built-in.
There is an issue that has been discussed on this list about
activerecord-jdbc-adapter. As I understand it, it will be fixed soon.
My best guess, is that when telling the database to use the jdbcmysql
adapter, (I am doing so in an external YAML file as I have several
scripts that use that connection info) activerecord simply uses the
newest gem available. 1.2.5 is the one that breaks compatibility. The
exception that it throws was what was tripping me up.
Thanks for the response regardless.
-Jim
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.