Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
rvm jruby problem with scripts
$ bundle
/Users/dalcorn/.rvm/gems/jruby-1.5.6@mimosa2/bin/bundle: line 9: require: command not found
/Users/dalcorn/.rvm/gems/jruby-1.5.6@mimosa2/bin/bundle: line 11: version: command not found
/Users/dalcorn/.rvm/gems/jruby-1.5.6@mimosa2/bin/bundle: line 13: syntax error near unexpected token `('
/Users/dalcorn/.rvm/gems/jruby-1.5.6@mimosa2/bin/bundle: line 13: `if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then'
$ which bundle
/Users/dalcorn/.rvm/gems/jruby-1.5.6@mimosa2/bin/bundle
$ ls -l `which bundle`
-rwxr-xr-x 1 dalcorn staff 410 Feb 24 15:09 /Users/dalcorn/.rvm/gems/jruby-1.5.6@mimosa2/bin/bundle*
$ head `which bundle`
#!/Users/dalcorn/.rvm/rubies/jruby-1.5.6/bin/jruby
#
# This file was generated by RubyGems.
#
# The application 'bundler' is installed as part of a gem, and
# this file is here to facilitate running it.
#
require 'rubygems'
$ ls -l /Users/dalcorn/.rvm/rubies/jruby-1.5.6/bin/jruby
-rwxr-xr-x 1 dalcorn staff 10058 Dec 7 15:31 /Users/dalcorn/.rvm/rubies/jruby-1.5.6/bin/jruby*
$ file /Users/dalcorn/.rvm/rubies/jruby-1.5.6/bin/jruby
/Users/dalcorn/.rvm/rubies/jruby-1.5.6/bin/jruby: Bourne-Again shell script text executable
$ head /Users/dalcorn/.rvm/rubies/jruby-1.5.6/bin/jruby
#!/bin/bash
# -----------------------------------------------------------------------------
# jruby.sh - Start Script for the JRuby interpreter
#
# Environment Variable Prequisites
#
# JRUBY_OPTS (Optional) Default JRuby command line args
# JRUBY_SHELL Where/What is system shell
#
# JAVA_HOME Must point at your Java Development Kit installation.
@dougalcorn

This comment has been minimized.

Copy link
Owner Author

@dougalcorn dougalcorn commented Feb 24, 2011

This was solved by re-installing jruby. Newer versions of rvm use the jruby-launcher binary rather than a jruby shell script. "rvm remove jruby; rvm install jruby-1.5.6" just worked. All gemsets left alone and .rvmrc just reloaded the right jruby and it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment