Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ruby local exec
ruby-local-exec command is deprecated as of rbenv 0.4.0 and will be removed in the next major release.
What is ruby-local-exec?
ruby-local-exec was introduced in rbenv 0.2.0 as a drop-in replacement for the standard Ruby shebang line:
ruby-local-exec in place, scripts in an application with a
.rbenv-version file use the application-specific Ruby version, regardless of what directory they're run from. This is useful for running scripts in cron jobs without needing to
cd into the application first.
Why is it deprecated?
The functionality provided by
ruby-local-exec has been rolled into the standard
ruby shim provided by rbenv.
Now, when you run scripts or binstubs in an application with a
.ruby-version file, rbenv will automatically use the application's specified Ruby version, regardless of what directory they're run from.
To upgrade, first ensure your team and its servers are on rbenv 0.4.0 or later. Adjust your shebangs back to:
Then be sure to regenerate your shims with
Can I silence the warning message?
RBENV_SILENCE_WARNINGS=1 in your environment to silence the
ruby-local-exec deprecation warning message.
If you used bundler with the option
--shebang ruby-local-exec, just remove it.