Using Invoker with rvm, rbenv or chruby.
The way rbenv
, chruby
and rvm
work sometimes creates problems when you are trying to use a process supervisor like invoker. There are couple of things to keep in mind,
If you are running invoker with Ruby version x, but your application requires Ruby version Y:
1. Using with rbenv
When using rbenv and zsh, remember that .zshrc
is not read for commands run via zsh -c
. So first
add:
and then run it using:
Unless version of Ruby using which you are running invoker command and version of Ruby you are using in the application is same, you almost always will want to use
zsh -c
or bash -c
.
2. Using with RVM
When using Invoker on RVM, you may have success running invoker setup
with:
RVM in particular requires a login shell and hence sometimes you may have to use bash -lc
. For example:
3. Using with chruby
When using Invoker with chruby, for running setup try:
Above command though may not work on Linux
and you may have to run it with:
Where ruby-2.1.2
is version of Ruby and ~/.gem/ruby/bin
is PATH where gem binaries are installed by
chruby. For usual usage you should try with: