Code Monkey home page Code Monkey logo

itamae-plugin-recipe-rbenv's Introduction

Itamae::Plugin::Recipe::Rbenv

Itamae plugin to install ruby with rbenv

Installation

Add this line to your application's Gemfile:

gem 'itamae-plugin-recipe-rbenv'

And then execute:

$ bundle

Or install it yourself as:

$ gem install itamae-plugin-recipe-rbenv

Usage

System wide installation

Install rbenv to /usr/local/rbenv or some shared path

Recipe

# your recipe
include_recipe "rbenv::system"

Node

Use this with itamae -y node.yml

# node.yml
rbenv:
  global:
    2.3.0
  versions:
    - 2.3.0
    - 2.2.4

  # rbenv install dir, optional (default: /usr/local/rbenv)
  rbenv_root: "/path/to/rbenv"

  # specify scheme to use in git clone, optional (default: git)
  scheme: https

  # Create /usr/local/rbenv/cache, optional (default: false)
  # See: https://github.com/rbenv/ruby-build#package-download-caching
  cache: true

# ruby-build is always installed. Specifying revision improves performance.
ruby-build:
  revision: e455975286e44393b1b33037ae1ce40ef2742401

# Optional plugin. Specify :install or :revision to install rbenv-default-gems.
rbenv-default-gems:
  default-gems:
    - bundler
    - bcat ~>0.6
    - rails --pre
  install: true
  # or
  revision: ead67889c91c53ad967f85f5a89d986fdb98f6fb

.bashrc

Recommend to append this to .bashrc in your server.

export RBENV_ROOT=/usr/local/rbenv
export PATH="${RBENV_ROOT}/bin:${PATH}"
eval "$(rbenv init -)"

Installation for a user

Install rbenv to ~#{node[:rbenv][:user]}/.rbenv

Recipe

# your recipe
include_recipe "rbenv::user"

Node

Use this with itamae -y node.yml

# node.yml
rbenv:
  user: k0kubun
  global:
    2.3.0
  versions:
    - 2.3.0
    - 2.2.4

  # specify scheme to use in git clone, optional (default: git)
  scheme: https

  # Create ~/.rbenv/cache, optional (default: false)
  # See: https://github.com/rbenv/ruby-build#package-download-caching
  cache: true

# ruby-build is always installed. Specifying revision improves performance.
ruby-build:
  revision: e455975286e44393b1b33037ae1ce40ef2742401

# Optional plugin. Specify :install or :revision to install rbenv-default-gems.
rbenv-default-gems:
  default-gems:
    - bundler
    - bcat ~>0.6
    - rails --pre
  install: true
  # or
  revision: ead67889c91c53ad967f85f5a89d986fdb98f6fb

MItamae

This plugin can be used for MItamae too. Put this repository under ./plugins as git submodule.

node.reverse_merge!(
  rbenv: {
    user: 'k0kubun',
    global: '2.3.1',
    versions: %w[
      2.3.1
      2.2.5
    ],
  }
)

include_recipe "rbenv::user"

License

MIT License

itamae-plugin-recipe-rbenv's People

Contributors

hatappi avatar k0kubun avatar katsyoshi avatar kawakubox avatar kwappa avatar muratayusuke avatar sue445 avatar takai avatar

Watchers

 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.