Reasons why you would use Unicorn instead of WEBrick?
- Unicorn is supposed to be faster than WEBrick
- You can spawn multiple processes
- If you are using unicorn in production. You would want your development env to be as close as production.
How to run unicorn locally?
- Uncomment
gem 'unicorn'
in Gemfile Create
unicorn.rb
file inconfig/
and add the following line. You can increase the number of processes if you want toworker_processes 1
start unicorn using the following command
unicorn -c config/unicorn.rb