8

I intend to replace WEBrick by Thin on a Rails 3.2 project because WEBrick handles malformed unescaped URIs badly (bad URI error). I know there are config hacks to make WEBrick handle unescaped URIs but just adding gem 'thin' to my Gemfile seems so easy that makes me wonder:

  • Is there something that could break or go wrong in my apllication if I do that?

BTW: I'm deploying on Heroku. If there are specific issues with Thin on Heroku then I would also like to know.

joscas
  • 7,474
  • 5
  • 39
  • 59

2 Answers2

7

If you have thin in your Gemfile rails s should start with thin. For example, the app I work on has thin in the development group in the Gemfile:

rails s
=> Booting Thin
=> Rails 3.2.14 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
PhilT
  • 4,166
  • 1
  • 36
  • 26
6

Nope.. Rails is just that simple! :)

Just make sure you start using:

thin start
Gaurav Agarwal
  • 14,664
  • 4
  • 29
  • 41
  • For rails I'd get in the habit of doing: rails s thin. For production, things like Heroku do bundle exec rails s thin. – rkulla Feb 08 '13 at 18:30
  • Just made a quick test with Thin and strangely, it solves my bad URI problem in development but not in production with Heroku. And I'm sure Heroku has been restarted using Thin. Any ideas why this could happen? – joscas Feb 08 '13 at 19:01
  • Check your production logs to make sure that the server started with thin. – Gaurav Agarwal Feb 08 '13 at 19:07
  • It is: === web: `bundle exec thin start -R config.ru -e $RAILS_ENV -p $PORT` web.1: up 2013/02/08 19:37:03 (~ 31m ago) – joscas Feb 08 '13 at 19:09