Hommer Smith
Hommer Smith

Reputation: 27852

Unicorn in Heroku? Why not in development?

I just installed the unicorn gem and added the config file under config/unicorn.rb

I also added a Procfile that looks like this:

web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb

I am wondering, why is my localhost not running in Unicorn even if I have added this? Where is it said that this should just run in Production?

Upvotes: 4

Views: 74

Answers (1)

Richard Peck
Richard Peck

Reputation: 76774

If you don't load the unicorn gem in your GemFile, Rails will default to WebBrick

We use Thin in development, and here is our GemFile:

group :development do
    gem 'thin'
end

group :production do
    gem 'puma'
    gem 'newrelic_rpm'
end

You may also benefit from this question: Why would I want to use unicorn or thin instead of WEBrick for development purposes?

Upvotes: 1

Related Questions