Search code examples
ruby-on-railsinstallationunicornthin

Rails with Unicorn. Should keep thin in gemfile?


I'm a bit confused. When adding Unicorn to my Rails app in Heroku, should I keep the Thin server in the Gemfile or should I remove it?


Solution

  • Thin and Unicorn are two different concurrent web servers. So once you made your choice you most likely don't want to keep both and instead stick to only one for both development and production environments.

    As stated in Heroku unicorn documentation: https://devcenter.heroku.com/articles/rails-unicorn

    Puma, Thin or Rainbows! are alternative web servers that may work better under load generated by slow clients. To change the web server running your app on Heroku, simply specify a different command for the web process type in your Procfile.

    Additional informations about both: Thin vs Unicorn on Heroku