Skip to content

Instantly share code, notes, and snippets.

@lmarburger
Created June 25, 2014 13:49
Show Gist options
  • Save lmarburger/0f638edcf6ebdf7f0a16 to your computer and use it in GitHub Desktop.
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?
$ 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
#!/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