make RVM also load gems at vendor/gems

2019-07-27 13:16发布

问题:

I have a project (tracks) that ships its gems under vendor/gems. Some of these gems are no longer available trough rubygems, so a rake gems:install fails.

I want rubygems to load gems from both the rvm-gem-dirs (/usr/local/rvm/gems/ruby-1.8.7-p334@tracks, /usr/local/rvm/gems/ruby-1.8.7-p334@global) and from the vendor/gems.

How can I add such a dir to the rubygems load path? Is that possible at all?

回答1:

Add the vendor/gems directory to the GEM_PATH environment variable.

GEM_PATH=$GEM_PATH:/home/berkes/your_project/vendor/gems