开发者

jruby public database adapter

开发者 https://www.devze.com 2022-12-15 13:49 出处:网络
I\'m trying to deploy my rails application from jRuby to Heroku The db is giving me problems: $ heroku db:push

I'm trying to deploy my rails application from jRuby to Heroku

The db is giving me problems:

$ heroku db:push
Auto-detected local database: jdbc开发者_StackOverflowmysql://root:password@localhost/product_develo
pment?encoding=utf8
Failed to connect to database:
  Sequel::AdapterNotFound -> Could not load jdbcmysql adapter:
  no such file to load -- /usr/lib/ruby/gems/1.8/gems/sequel-3.0.0/lib/sequel/adapters/jdbcmysql

any help please??


This has nothing to do with what Heroku supports (in the cloud), since the argument to db:push is the local database, not the one in the cloud.

Try running this instead:

heroku db:push jdbc:mysql://root:password@localhost/product_development?encoding=utf8

Also, consider updating Sequel to the latest version.

I'm still not sure if that will work, it depends on if the heroku command line client is using JRuby or not. Another possible problem is that ActiveRecord may require jdbcmysql and Sequel requires jdbc:mysql, and taps uses both (currently, hopefully it'll be Sequel-only in the future).


Heroku does not support JRuby, unfortunately. You may want to look into Engine Yard Cloud, which will soon have production JRuby support.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号