How to run a Ruby program with locally installed stones?

I installed my dependencies using

bundle package 

Then it is transferred to a stand-alone server and starts:

 > bundle install --local Using mime-types (1.19) Using rest-client (1.6.7) Using trollop (1.16.2) Using bundler (1.1.4) Your bundle is complete! It was installed into ./vendor/bundle 

However, the application cannot be launched:

 ruby someprogram.rb /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- trollop (LoadError) from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from someprogram.rb:2:in `<main>' 

What do I need to tell Ruby to run locally installed stones?

+3
source share
1 answer

You are missing bundle exec in front of your ruby someprogram.rb .

+6
source

Source: https://habr.com/ru/post/1484803/


All Articles