Closed ifesdjeen closed 9 years ago
There is a bug in JRuby 1.6 which makes Machinist2 fail occasionally. https://jira.codehaus.org/browse/JRUBY-6035 This bug has been fixed in 1.7 only
I'm very sorry but I don't think this is a good way to handle this. The .gemspec
is read at the time you build and release your gem, so any conditional logic in that file will be evaluated once when the gem is built and released on your machine.
What you need instead is to evaluate the platform at runtime. You can do this in your Gemfile
instead as none of the ActiveRecord adapters is an actual dependency of Machinist:
platforms :ruby do
gem "sqlite3"
end
platforms :jruby do
gem "activerecord-jdbcsqlite3-adapter"
end
I've got a fork of Machinist that does exactly this: https://github.com/liquid/machinist/blob/master/Gemfile
Hi, here's a rather small pull request that adds jruby support.
Tests are passing :) on both platforms
If you don't mind/want to, I could add .travis.yml with all supported rubies. What do you think?