views:

83

answers:

2

Hi,

I want use always thin when I start my rails server in development mode.

By default it webrick to use. So I add thin in my Gemfile

gem 'thin', :group => 'development'

Now If I want use it to launch my server in development mode I mandatory define it.

bundle exec rails s thin

If I don't define it, it's always use webrick. So How define using thin by default ?

+1  A: 

Instead of rails s just type :

>> thin start -p 3000

Where 3000 is the number of your port.

You can also specify an enviornment :

>> thin start -e production
Trip
the autoloading works too with this command ?
shingara
It seems like it should, though I have little experience with it. Here's some infos http://www.rubyinside.com/ruby-techniques-revealed-autoload-1652.html and http://www.softiesonrails.com/2008/4/27/using-thin-instead-of-mongrel
Trip
Autoloading should work with this. Its also interesting to note that mongrel becomes default if we include it in the gemfile, but its not the case with thin. Does anyone know why?
Amit
I think it's historical. Because this behaviour is present since a long time ago.
shingara
A: 

Assuming you are using bundler 1.0.x and your gems is vendorized:

bundle exec vendor/ruby/1.9.1/bin/thin start

jpartogi
no need complete path. bundle exec thin start works too
shingara