5

我已经使用安装了我的依赖项

bundle package

然后将它们转移到离线服务器并运行:

> 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

但是,无法运行该应用程序:

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>'

我需要为 Ruby 指定什么才能运行本地安装的 gem?

4

1 回答 1

6

你在你的命令bundle exec面前失踪了。ruby someprogram.rb

于 2012-07-02T12:57:35.477 回答