Gem wrappers

Gem Version Code Climate Coverage Status Build Status Dependency Status Documentation

Create gem wrappers for easy use of gems in cron and other system locations.

Configuration / Defaults

In ~/.gemrc you can overwrite this defaults:

wrappers_path: GEM_HOME/wrappers
wrappers_environment_file: GEM_HOME/environment
wrappers_path_take: 1

It is not yet possible to put variables in the configuration, only relative and full paths will work, open a ticket if you need variables.

Generating wrappers

By default wrappers are installed when a gem is installed, to rerun the process for all gems in GEM_HOME use:

gem wrappers regenerate

Showing current configuration

To see paths that are used by gem run:

gem wrappers

Environment file

User can provide his own environment file, in case it is not available during generating wrappers it will be created using this template:

export PATH="<%= path.join(":") %>:$PATH"
export GEM_PATH="<%= gem_path.join(":") %>"
export GEM_HOME="<%= gem_home %>"

The path elements are calculated using this algorithm:

ENV['PATH'].split(":").take(Gem.path.size + path_take)