Question: puma plus bundler: launch app using pumactl, but bundler aware

Question

puma plus bundler: launch app using pumactl, but bundler aware

Answers 1
Added at 2016-12-13 20:12
Tags
Question

I'm creating a Puma/Sinatra app and would like to use bundler to manage gem versions. I have a Gemfile, Gemfile.lock, etc. I can launch my app via:

bundle exec puma -C config.rb

But I'd also like to set up an init.d script to run the app as a service, and for that I was planning to use pumactl. However, when I start the app using pumactl it seems not to care about bundler:

pumactl -F config.rb start

I tested this by requiring ActiveRecord 5.0+ in my Gemfile, running bundle install, manually removing ActiveRecord 5.0.0.1, then launching the app via pumactl. It picked up a 4.x version of ActiveRecord.

Is there a way to use pumactl in conjunction with bundler so that the app will get the gem versions specified in Gemfile.lock?

Answers to

puma plus bundler: launch app using pumactl, but bundler aware

nr: #1 dodano: 2016-12-13 20:12

Try this:

bundle exec pumactl -F config.rb start
Source Show
◀ Wstecz