JRuby issues
Closed this issue · 2 comments
I've tried with 0.0.9 and with 2c3b2d1 to get a project to build with JRuby 1.7.2 and 1.7.3, but no luck.
The output for 2c3b2d1 is below:
$ bash -c 'echo "${RBENV_ROOT:-$HOME/.rbenv}"'
$ bash -c "test -d /var/lib/jenkins/.rbenv"
$ bash -c "test -d /var/lib/jenkins/.rbenv/plugins/ruby-build"
$ bash -c "test -d /var/lib/jenkins/.rbenv/versions/jruby-1.7.3"
Update rbenv
$ bash -c "cd /var/lib/jenkins/.rbenv && git pull"
Update ruby-build
$ bash -c "cd /var/lib/jenkins/.rbenv/plugins/ruby-build && git pull"
Install jruby-1.7.3
$ bash -c "/var/lib/jenkins/.rbenv/bin/rbenv install jruby-1.7.3"
Downloading jruby-1.7.3.tar.gz...
-> http://jruby.org.s3.amazonaws.com/downloads/1.7.3/jruby-bin-1.7.3.tar.gz
Installing jruby-1.7.3...
Installed jruby-1.7.3 to /var/lib/jenkins/.rbenv/versions/jruby-1.7.3
$ bash -c "/var/lib/jenkins/.rbenv/versions/jruby-1.7.3/bin/gem list"
FATAL: (RuntimeError) failed: "/var/lib/jenkins/.rbenv/versions/jruby-1.7.3/bin/gem list"
�[8mha:AAAAWB+LCAAAAAAAAABb85aBtbiIQSmjNKU4P08vOT+vOD8nVc8DzHWtSE4tKMnMz/PLL0ldFVf2c+b/lb5MDAwVRQxSaBqcITRIIQMEMIIUFgAAckCEiWAAAAA=�[0morg.jruby.exceptions.RaiseException: (RuntimeError) failed: "/var/lib/jenkins/.rbenv/versions/jruby-1.7.3/bin/gem list"
at RbenvWrapper.run(/var/lib/jenkins/plugins/rbenv/WEB-INF/classes/models/rbenv_wrapper.rb:76)
at RbenvWrapper.capture(/var/lib/jenkins/plugins/rbenv/WEB-INF/classes/models/rbenv_wrapper.rb:69)
at RbenvWrapper.setup(/var/lib/jenkins/plugins/rbenv/WEB-INF/classes/models/rbenv_wrapper.rb:46)
at Jenkins::Model::EnvironmentProxy::InstanceMethods.setUp(/var/lib/jenkins/plugins/rbenv/WEB-INF/classes/vendor/gems/gems/jenkins-plugin-runtime-0.2.3/lib/jenkins/model/environment_proxy.rb:8)
The output for 0.0.9 is below:
$ bash -c "test -d ~/.rbenv"
$ bash -c "test -d ~/.rbenv/plugins/ruby-build"
$ bash -c "test -d $HOME/.rbenv/versions/jruby-1.7.2"
$ bash -c "$HOME/.rbenv/versions/jruby-1.7.2/bin/gem list"
Install bundler
$ bash -c "$HOME/.rbenv/versions/jruby-1.7.2/bin/gem install bundler"
/usr/bin/env: jruby: No such file or directory
Install rake
$ bash -c "$HOME/.rbenv/versions/jruby-1.7.2/bin/gem install rake"
/usr/bin/env: jruby: No such file or directory
[workspace] $ /bin/bash -xe /tmp/hudson2443396353366868948.sh
+ mv database-jdbc-mysql.yml config/database.yml
+ bundle install
/var/lib/jenkins/jobs/valuationup_new_advisor_flow_jruby/workspace/Gemfile:8:in `evaluate': compile error (SyntaxError)
/var/lib/jenkins/jobs/valuationup_new_advisor_flow_jruby/workspace/Gemfile:8: syntax error, unexpected ':', expecting $end
gem 'mysql2', platform: :mri_19
^
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.17/lib/bundler/definition.rb:17:in `build'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.17/lib/bundler.rb:136:in `definition'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.17/lib/bundler/cli.rb:220:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.17/lib/bundler/vendor/thor/task.rb:22:in `send'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.17/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.17/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.17/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.17/lib/bundler/vendor/thor/base.rb:386:in `start'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.17/bin/bundle:13
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19
On 0.0.9 it is clear that something isn't right with the PATH. On master, I get the following in the shell on the CI server:
jenkins@ci:~$ export PATH=/var/lib/jenkins/.rbenv/shims:$PATH
jenkins@ci:~$ bash -c "/var/lib/jenkins/.rbenv/versions/jruby-1.7.2/bin/gem list"
rbenv: jruby: command not found
The `jruby' command exists in these Ruby versions:
jruby-1.7.2
Absolutely stumped. Anything more I can provide to help trace this down?
The app in question runs fine under 1.9.3 and 2.0.0, but I'd like a separate job to keep track of JRuby support for future deployment options.
Reproduced on my installation. I added a workaround for this in SHA1@776012dd8110e875fbc4bd2f58ba0da70012202f.
@kennethkalmer
Please test with current master if the problem has been fixed.
Looks good thanks! Getting an unintended behaviour, adding some comments to #16 to explain.