【发布时间】:2017-04-28 23:12:56
【问题描述】:
我正在创建一个 Puma/Sinatra 应用,并希望使用 bundler 来管理 gem 版本。我有一个 Gemfile、Gemfile.lock 等。我可以通过以下方式启动我的应用程序:
bundle exec puma -C config.rb
但我还想设置一个 init.d 脚本来将应用程序作为服务运行,为此我计划使用pumactl。但是,当我使用 pumactl 启动应用程序时,它似乎并不关心捆绑程序:
pumactl -F config.rb start
我通过在我的 Gemfile 中要求 ActiveRecord 5.0+ 进行测试,运行 bundle install,手动删除 ActiveRecord 5.0.0.1,然后通过 pumactl 启动应用程序。它采用了 4.x 版本的 ActiveRecord。
有没有办法将 pumactl 与 bundler 结合使用,以便应用获得 Gemfile.lock 中指定的 gem 版本?
【问题讨论】:
标签: rubygems sinatra bundler puma