You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Plugin for rbenv to use a ruby version from bundler's Gemfile. If a custom Ruby version is not already set locally per-directory (like in .ruby-version), this looks for a Ruby version in the current tree's Gemfile and uses that version.
Requirements: rbenv 1.0.0 or higher
Installation
Check the plugin out into your rbenv plugins directory:
Not needed starting from Ruby 2.1: If you don't already have a symlink in "$(rbenv root)"/versions from your latest Ruby patchlevel (2.0.0-p247) to the base version (2.0.0), now would be a good time to do that. You can install rbenv-aliases to make this easier. Once you have rbenv-aliases installed: run:
rbenv alias --auto
That's it! Now ruby, gem, and your other rbenv shims should automatically find the correct Ruby version.
Caveats
The logic currently used to find the version is simplistic; rbenv-bundler-ruby-version supports:
The parsing is done with regular expressions, i.e. no ruby evaluation is done. So expressions and conditionals are NOT handled and anything else is not handled. Prepend true && to the ruby line if you are doing such and want to hide it from this plugin.
About
rbenv plugin to pick a ruby version from bundler's Gemfile