Created
January 13, 2012 09:43
-
-
Save dnagir/1605310 to your computer and use it in GitHub Desktop.
RVM JRuby 1.9 mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> if [[ "$RUBY_VERSION" == "jruby-19" ]]; then export export PROJECT_JRUBY_OPTS=( --1.9 ); fi | |
> rvm use $RUBY_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> cd ~/.rvm/hooks | |
> chmod -x after_use_jruby | |
> chmod +x after_use_jruby_opts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> # Just set PROJECT_JRUBY_OPTS before running RVM, thats it | |
> export PROJECT_JRUBY_OPTS=( --1.9 ) | |
> rvm use jruby | |
> ruby -v | |
> jruby 1.6.5.1 (ruby-1.9.2-p136) (2011-12-27 1bf37c2) (Java HotSpot(TM) Client VM 1.6.0_29) [darwin-i386-java] | |
> echo $JRUBY_OPTS | |
--client -J-d32 --1.9 | |
> # Note the other JRUBY_OPTS are preserved | |
> # Also note the when shelling out it is still Ruby 1.9 | |
> ruby -e "system('ruby -v')" | |
jruby 1.6.5.1 (ruby-1.9.2-p136) (2011-12-27 1bf37c2) (Java HotSpot(TM) Client VM 1.6.0_29) [darwin-i386-java] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment