Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build against JRuby #38

Merged
merged 3 commits into from
Nov 3, 2015
Merged

Build against JRuby #38

merged 3 commits into from
Nov 3, 2015

Conversation

smellsblue
Copy link
Contributor

This is mostly about running the specs (especially integration specs) against JRuby to ensure Gemstash responds with the correct gems when you are using a different platform.

However, if we want to support a JRuby version of this gem, this PR includes support for that as well... it will just be a matter of building and pushing the gem under JRuby.

A few oddities I encountered:

  • Travis doesn't have full support for JRuby 9000 yet... hence the jruby-9.0.3.0 version in .travis.yml. Anything else will not install the right version of JRuby
  • Process.spawn is broken under JRuby, I filed a ticket against JRuby for this, it affected us because it causes Bundler to think our Gemfile was the current working directory
  • JRuby was erroring out when checking that the test servers were ready to receive requests with an error that I hadn't seen on MRI (Errno::EBADF)
  • Bundler has an existing issue where there is a warning message being output when using JRuby 9000, I have this sectioned off in the helper so we can remove the code when Bundler gets updated
  • Travis is building JRuby 9000 in a weird way such that a separate warning message comes up (I don't see it running on my machine). I adapted the spec for this case like I did for the previous item, but I don't know when or how this might get fixed by Travis

Use jdbc when using JRuby
Platform needs to be stringified when not Ruby
Build JRuby on Travis, mostly to see if bundling works with Gemstash and JRuby
In ExecHeleprs:
  Specify BUNDLE_GEMFILE when there is a Gemfile in the directory, otherwise
  JRuby bug gives us empty BUNDLE_GEMFILE, which triggers weird handling in
  Bundler to evaluate empty BUNDLE_GEMFILE incorrectly as the current directory
  (will be fixed in 1.11.0). Also hitting another bug that will be fixed in
  1.11.0 where a warning is output when bundle exec on JRuby 9000 (affects
  integration spec output).
…stash is fetching the right gem

Update specs to offer both versions, and assert the correct one is being used depending on the platform we are on
@pcarranza
Copy link
Contributor

👍

smellsblue added a commit that referenced this pull request Nov 3, 2015
@smellsblue smellsblue merged commit 190f352 into master Nov 3, 2015
@smellsblue smellsblue deleted the build-against-jruby branch November 3, 2015 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants