Skip to content

Manage different sets of environment variables with rbenv-vars

License

Notifications You must be signed in to change notification settings

YanhaoYang/rbenv-set-vars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

rbenv-set-vars

This is a plugin for rbenv, used with the plugin rbenv-vars, making it convenient to switch among different sets of environment variables.

Installation

To install rbenv-set-vars, clone this repository into your ~/.rbenv/plugins directory. (You'll need a recent version of rbenv that supports plugin bundles.)

$ mkdir -p ~/.rbenv/plugins
$ cd ~/.rbenv/plugins
$ git clone https://github.com/YanhaoYang/rbenv-set-vars

Usage

Define sets of environment variables in your project, with file names like .rbenv-vars-dev, .rbenv-vars-deploy. For example, you may have different BUNDLE_GEMFILE settings:

.rbenv-vars-dev:

BUNDLE_GEMFILE=Gemfile_with_local_paths

.rbenv-vars-deploy

BUNDLE_GEMFILE=Gemfile_with_git_urls

Having those files created, you can switch the environment varialbes with commands like:

rbenv set-vars dev
rbenv set-vars deploy

Those commands simply create a symbol link to .rbenv-vars-dev, .rbenv-vars-deploy. Warn: .rbenv-vars will be replaced by those commands.

Version History

  • Initial public release.

License

© 2013 Yanhao Yang. Released under the MIT license. See LICENSE for details.

About

Manage different sets of environment variables with rbenv-vars

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages