Would be nice if you could enable the Wiki so users can add How-To articles or similar, thx. Of course there probably might not be many, but here's an actual example for a how-to I was looking for:
Recently I've run into the situation where I had to use jruby in 1.9 mode. To enable the 1.9 mode in jruby 1.6.x one has to provide the argument --1.9 to every call to ruby. So while switching to jruby works perfectly with rbfu, it might not be in the correct mode for the current project. Initially I thought it might be nice if there's support for this out of the box by rbfu, but on the other hand this is probably out of the scope of rbfu, because mode switching is vendor specific. Furthermore it can be easily done by using a wrapper script before calling the original jruby binary:
install jruby using ruby-build or whatever: ruby-build jruby-1.6.7.2 ~/.rbfu/rubies/jruby-1.9-1.6.7.2
rename jruby to _jruby-bin: cd ~/.rbfu/rubies/jruby-1.9-1.6.7.2/bin && mv jruby _jruby-bin
create a wrapper script which sets the --1.9 option:
Tadaa, now when calling rbfu @jruby-1.9-1.6.7.2 ruby -v is automatically in 1.9 mode, also all commands like irb, gem etc. use the correct mode as well. A similar solution would work for rbx to enable 1.9 mode.
Would be nice if you could enable the Wiki so users can add How-To articles or similar, thx. Of course there probably might not be many, but here's an actual example for a how-to I was looking for:
Recently I've run into the situation where I had to use jruby in 1.9 mode. To enable the 1.9 mode in jruby 1.6.x one has to provide the argument
--1.9
to every call to ruby. So while switching to jruby works perfectly with rbfu, it might not be in the correct mode for the current project. Initially I thought it might be nice if there's support for this out of the box by rbfu, but on the other hand this is probably out of the scope of rbfu, because mode switching is vendor specific. Furthermore it can be easily done by using a wrapper script before calling the original jruby binary:ruby-build jruby-1.6.7.2 ~/.rbfu/rubies/jruby-1.9-1.6.7.2
jruby
to_jruby-bin
:cd ~/.rbfu/rubies/jruby-1.9-1.6.7.2/bin && mv jruby _jruby-bin
--1.9
option:Tadaa, now when calling
rbfu @jruby-1.9-1.6.7.2 ruby -v
is automatically in 1.9 mode, also all commands like irb, gem etc. use the correct mode as well. A similar solution would work for rbx to enable 1.9 mode.