a capistrano recipe to manage rubies with rbenv.
Add this line to your application's Gemfile:
gem 'capistrano-rbenv'
And then execute:
$ bundle
Or install it yourself as:
$ gem install capistrano-rbenv
This recipe will install rbenv and ruby-build during deploy:setup
task.
To setup rbenv for your application, add following in you config/deploy.rb
.
# config/deploy.rb
require "capistrano-rbenv"
set :rbenv_ruby_version, "1.9.3-p392"
Following options are available to manage your rbenv.
:rbenv_branch
- the git branch to installrbenv
from. usemaster
by default.:rbenv_bundler_gem
- package name ofbundler
.:rbenv_bundler_version
- version forbundler
package.:rbenv_cmd
- therbenv
command.:rbenv_path
- the path whererbenv
will be installed. use$HOME/.rbenv
by default.:rbenv_plugins
- rbenv plugins to install. installruby-build
by default.:rbenv_repository
- repository URL of rbenv.:rbenv_ruby_dependencies
- dependency packages.:rbenv_ruby_version
- the ruby version to install. install1.9.3-p392
by default.:rbenv_install_bundler
- controls whether installing bundler or not.true
by default.:rbenv_install_dependencies
- controls whether installing dependencies or not.true
if the required packages are missing.:rbenv_setup_shell
- setup rbenv in your shell config or not.true
by default. users who are using Chef/Puppet may prefer setting this valuefalse
.:rbenv_setup_default_environment
- setupRBENV_ROOT
and updatePATH
to use rbenv over capistrano.true
by default.:rbenv_configure_files
- list of shell configuration files to be configured for rbenv. by default, guessing from user's$SHELL
and$HOME
.:rbenv_configure_basenames
- advanced option for:rbenv_configure_files
. list of filename of your shell configuration files if you don't like the default value of:rbenv_configure_files
.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- YAMASHITA Yuu (https://github.com/yyuu)
- Geisha Tokyo Entertainment Inc. (http://www.geishatokyo.com/)
- Nico Schottelius (http://www.nico.schottelius.org/)
MIT