Skip to content
This repository has been archived by the owner on Mar 4, 2018. It is now read-only.
This repository has been archived by the owner on Mar 4, 2018. It is now read-only.

Please enable Wiki for How-Tos #25

Closed
lwe opened this issue Jul 12, 2012 · 1 comment
Closed

Please enable Wiki for How-Tos #25

lwe opened this issue Jul 12, 2012 · 1 comment

Comments

@lwe
Copy link
Contributor

lwe commented Jul 12, 2012

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:

  1. install jruby using ruby-build or whatever: ruby-build jruby-1.6.7.2 ~/.rbfu/rubies/jruby-1.9-1.6.7.2
  2. rename jruby to _jruby-bin: cd ~/.rbfu/rubies/jruby-1.9-1.6.7.2/bin && mv jruby _jruby-bin
  3. create a wrapper script which sets the --1.9 option:
echo '#/bin/sh
_jruby-bin --1.9 "$@"' > ~/.rbfu/rubies/jruby-1.9-1.6.7.2/bin/jruby
chmod +x ~/.rbfu/rubies/jruby-1.9-1.6.7.2/bin/jruby

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.

@lwe
Copy link
Contributor Author

lwe commented Jul 12, 2012

^^ uhm, just saw that there's a FAQ section in the README, would this be a useful addition?

@lwe lwe closed this as completed Aug 17, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant