Reputation: 19825
I am using bundle to install all the needed gems into a local folder for the ease of development and testing
bundle install --path vendor/bundle
And I can find libs are being installed under the folder "vendor/bundle", but how to tell my ruby to use that folder as well?
e.g. When I start my program in the shell
/Users/howard/.rbenv/versions/1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require': cannot load such file -- yajl (LoadError)
But yajl is under the folder /vendor/bundle/ruby/1.9.1/gems/yajl-ruby-1.1.0/
Upvotes: 2
Views: 2125
Reputation: 1208
This is too obvious, but just in case... Did you try:
bundle exec your_script.rb
Upvotes: 4