Friday, October 8, 2010

[Rails] Re: Newbie! How to return to the command prompt after launching rails server

Zoltan Gero wrote:
> don't worry, there's no dummy questions, everyone had to start
> somewhere.
>
> On UNIX based systems (MacOS or Linux) just press CTRL+C, and the
> server will stop.
>
> Later it can be a good idea to install Thin, because it starts faster,
> you do not have to wait when you rebooting server. Then just run "ruby
> script/server -thin" (if I remember well).

There's actually a new option, which I think is fantastic:

gem install passenger --pre
cd your_rails_project
passenger start

This will allow you to run using the server that will most likely power
your Rails application in production, but with the same conveniences as
rails s. You can stop passenger in the same way with (Ctrl-C). Another
nice convenience is that if you need to restart, you can touch
tmp/restart.txt just like you would on the deployment server.

As mentioned by others, it is common and very convenient to run the
server in a separate terminal. I generally have three terminal tabs open
when developing Rails. One for running command line generators and rake,
a second for running autotest (w/ autotest-growl), and a third for
running passenger and monitoring the development log.

Note: The first time you use passenger start it will install a number of
things. Most notably Nginx, which makes developing locally work in a
very similar environment to what production will be.
--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate