activerecord-jdbc-adapter: 'activerecord-jdbcpostgresql-adapter' not compatible with ActiveRecord 5

After I migrate to Rails 5.0.0.beta1 when I run rake db:rollback STEP=1, I got the following in my CLI. But when I fallback to Rails 4.2.5, everything’s fine. Maybe the gem is not compatible with activerecord 5.0.0.beta1. Any temporary solution to this or we have to wait for a next release? Thanks.

DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from each at /Users/Nostophilia/.rvm/gems/jruby-9.0.4.0@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:1)
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <top> at /Users/Nostophilia/.rvm/gems/jruby-9.0.4.0@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:1)
rake aborted!
NameError: uninitialized constant ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES
/Users/Nostophilia/.rvm/gems/jruby-9.0.4.0/gems/activerecord-jdbc-adapter-1.3.19/lib/arjdbc/jdbc/type_cast.rb:9:in `<module:TypeCast>'
blah..blah

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 2
  • Comments: 45 (17 by maintainers)

Commits related to this issue

Most upvoted comments

The following worked for me on a new Rails 5.0.1 project with SQLite and JRuby 9.1.7.0

gem 'activerecord-jdbcsqlite3-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter.git', branch: 'rails-5'
gem 'listen', group: :development

@jrochkind we will be releasing something before rubyconf for sure (which is next week). We are down to <10 F/E across all three big adapters (sqlite3, mysql, and postgresql) on all AR tests. We are still trying to knock those down and then it is just dealing with some packaging cleanup tasks.

For people following we are actively working on this now and we should have a release out by Rubyconf timeframe. On the rails5 branch, sqlite3 adapater is down to 5E/5F and once we figure out a couple of more things then all the other adapters should get updated fairly quickly.

this issue is still occurring in rails 5.1.1

@platbr That syntax is suboptimal.

source 'https://rubygems.org'
git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" } # bundler < 2.x security
# ...
platform :jruby do
  github 'jruby/activerecord-jdbc-adapter', branch: 'rails-5' do
    gem 'activerecord-jdbc-adapter'
    gem 'activerecord-jdbcpostgresql-adapter'
  end
  # other jruby gems
end

Mine works using:

gem 'activerecord-jdbc-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter.git', branch: 'rails-5'
gem 'activerecord-jdbcpostgresql-adapter', git: 'https://github.com/jruby/activerecord-jdbc-adapter.git', branch: 'rails-5'

jruby 9.0.5.0. I got a null point exception on 9.1.5.0.

This issue is closed as the “alias_method_chain” issue was solved (with rails-5 branch).