Git Product home page Git Product logo

rbenv's Introduction

Capistrano::rbenv

This gem provides idiomatic rbenv support for Capistrano 3.x (and 3.x only).

Please Note

If you want to use this plugin with Cap 2.x, please use 1.x version of the gem. Source code and docs for older integration is available in another repo

Thanks a lot to @yyuu for merging his gem with official one.

Installation

Add this line to your application's Gemfile:

gem 'capistrano', '~> 3.1'
gem 'capistrano-rbenv', '~> 2.0'

And then execute:

$ bundle install

Usage

# Capfile
require 'capistrano/rbenv'


# config/deploy.rb
set :rbenv_type, :user # or :system, depends on your rbenv setup
set :rbenv_ruby, '2.0.0-p247'

# in case you want to set ruby version from the file:
# set :rbenv_ruby, File.read('.ruby-version').strip

set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"
set :rbenv_map_bins, %w{rake gem bundle ruby rails}
set :rbenv_roles, :all # default value

If your rbenv is located in some custom path, you can use rbenv_custom_path to set it.

Defining the ruby version

To set the Ruby version explicitly, add :rbenv_ruby to your Capistrano configuration:

# config/deploy.rb
set :rbenv_ruby, '2.0.0-p247'

Alternatively, allow the remote host's rbenv to determine the appropriate Ruby version by omitting :rbenv_ruby. This approach is useful if you have a .ruby-version file in your project.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

rbenv's People

Contributors

kirs avatar mattbrictson avatar neektza avatar eddiesel avatar jonhyman avatar miry avatar seenmyfate avatar dmarkow avatar koenpunt avatar leehambley avatar paviensky avatar rmoriz avatar spikeheap avatar

Watchers

Guillermo Horno avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.