Rails5 jruby not able to start
Asked Answered
P

2

5

Not able to start rails5 with jruby, getting the following error.

gavinyap@gavin-ubuntu  ~/Development/rails5app  rails s
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original     method using super. (called from require at bin/rails:4)
Bundler::GemRequireError: There was an error while trying to load the gem 'activerecord-jdbcmysql-adapter'.
Gem Load Error is: uninitialized constant ActiveRecord::ConnectionAdapters::Column::Format
Backtrace for gem load error is:
/home/gavinyap/.rvm/gems/jruby-9.1.2.0/gems/activerecord-jdbc-adapter-1.3.20/lib/arjdbc/jdbc/type_cast.rb:13:in `<module:TypeCast>'
/home/gavinyap/.rvm/gems/jruby-9.1.2.0/gems/activerecord-jdbc-adapter-1.3.20/lib/arjdbc/jdbc/type_cast.rb:7:in `<module:Jdbc>'
/home/gavinyap/.rvm/gems/jruby-9.1.2.0/gems/activerecord-jdbc-adapter-1.3.20/lib/arjdbc/jdbc/type_cast.rb:4:in `<   module:ConnectionAdapters>'
/home/gavinyap/.rvm/gems/jruby-9.1.2.0/gems/activerecord-jdbc-adapter-1.3.20/lib/arjdbc/jdbc/type_cast.rb:3:in `<top>'
/home/gavinyap/.rvm/gems/jruby-9.1.2.0/gems/activerecord-jdbc-adapter-1.3.20/lib/arjdbc/jdbc/column.rb:1:in `singleton cla

Versions of Jruby and Rails

  • jruby 9.1.2.0 (2.3.0) 2016-05-26 7357c8f
  • OpenJDK 64-Bit Server
  • VM 25.91-b14 on 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14 +jit [linux-x86_64]
  • Rails 5.0.0
Polysyllable answered 25/7, 2016 at 7:59 Comment(0)
P
6

The ActiveRecord JDBC gem has not been updated for Rails 5. Checking the project in GitHub shows some development activity early this year but there is no indication when a new gem will be released for Rails 5.

Physic answered 26/7, 2016 at 22:57 Comment(0)
D
4

add gem 'activerecord-jdbcmysql-adapter', '~> 5.0.pre1' to your gemfile

Ducan answered 24/12, 2016 at 4:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.