Created
June 25, 2014 13:49
-
-
Save lmarburger/0f638edcf6ebdf7f0a16 to your computer and use it in GitHub Desktop.
What's the best way to run a ruby executable from a specific rbenv 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
$ ruby -v | |
ruby 1.9.3p545 (2014-02-24 revision 45159) [x86_64-darwin13.1.0] | |
$ rbenv exec travis --version | |
rbenv: travis: command not found | |
The `travis' command exists in these Ruby versions: | |
2.1.1 | |
$ which travis | |
/Users/Larry/.bin/travis | |
$ travis --version | |
1.6.14 |
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
#!/usr/bin/env bash | |
# Run travis installed in ruby 2.1.1 | |
export RBENV_VERSION=2.1.1 | |
exec rbenv exec travis $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment