Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop (and restart) the Rails Server?

I'm following the instructions here http://railsinstaller.org/mac to get up and running with Rails on a Mac running OS X 10.8.2

At step 8 I'm asked to restart Rails server but how?

I'm assuming via a command line, but from within the already open ruby terminal window or a new one?

like image 521
Paul Seattle Avatar asked Dec 01 '12 02:12

Paul Seattle


People also ask

How do you stop a Rails server?

For Rails 5.0 and above, you can use this command Show activity on this post. Use ctrl+c to shutdown your Webrick Server.

How do I restart rails?

You can restart the application by creating or modifying the file tmp/restart. txt in the Rails application's root folder. Passenger will automatically restart the application during the next request. Depending on the version of Passenger installed on the server, restart.

How do you stop Puma rails?

It says 'To stop, click Ctrl+c '.


2 Answers

Press Ctrl+C

When you start the server it mentions this in the startup text.

like image 168
jefflunt Avatar answered Sep 29 '22 05:09

jefflunt


Now in rails 5 you can do:

rails restart 

The output of rails --tasks:

Restart app by touching tmp/restart.txt

I think that is usefully if you run rails as a demon

like image 24
Daniel Antonio Nuñez Carhuayo Avatar answered Sep 29 '22 05:09

Daniel Antonio Nuñez Carhuayo