Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How define his own server with Rails 3

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 ?

like image 983
shingara Avatar asked Sep 09 '10 16:09

shingara


People also ask

How do I find my Rails server?

Go to your browser and open http://localhost:3000, you will see a basic Rails app running. You can also use the alias "s" to start the server: bin/rails s . The server can be run on a different port using the -p option. The default development environment can be changed using -e .

Why my Rails server is not working?

The problem could be that webpacker isn't stalled or your system can not locate it. So installing webpacker can be your next step. Try running this command in your terminal. After running the command navigate to your rails application and run the rails server command.

How do you stop a Rails server?

Normally in your terminal you can try Ctrl + C to shutdown the server. And this will go back into the process, and then quit out of Rails s properly.


1 Answers

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
like image 51
Trip Avatar answered Oct 20 '22 03:10

Trip