Murph2m
2010-Oct-07 21:22 UTC
Newbie! How to return to the command prompt after launching rails server
Hi I am following the Ruby on Rails Tutorial: Learn Rails by Example I am on chapter 2 creating the demo app using scaffolding and have generated the user scaffold, migrated the database using Rake and then run the local webserver using ''rails s'' This has all worked great and I now need to generate the next bit of scaffolding but I don''t know how to get back to the command prompt after using ''rails s'' . I know I could launch another terminal session but is this the only way? Will I be leaving one terminal open running ''rails s'' all the time and another to actually work on? As anyone can tell I am a total newbie to Ruby on Rails but I am keen to learn and very much appreciate any help with my dumb starter questions!! Thanks Matt -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Mark Weston
2010-Oct-08 10:04 UTC
Re: Newbie! How to return to the command prompt after launching rails server
rails server -d (or --daemon) will start up the server process in the background and return you to your terminal prompt (at least on Linux or OS/X, I haven''t tried it in Windows). But you do get useful output in the server window in terms of error messages and deprecation warnings, so it''s probably worth letting it keep it''s own terminal. In fact you''ll probably end up finding it useful to have three or four terminal running at once so as to monitor the rails server, log files, your tests running under autotest plus one to actually do stuff in! Mark On 7 October 2010 22:22, Murph2m <murph2m-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi > > I am following the Ruby on Rails Tutorial: Learn Rails by Example > > I am on chapter 2 creating the demo app using scaffolding and have > generated the user scaffold, migrated the database using Rake and then > run the local webserver using ''rails s'' > > This has all worked great and I now need to generate the next bit of > scaffolding but I don''t know how to get back to the command prompt > after using ''rails s'' . I know I could launch another terminal session > but is this the only way? Will I be leaving one terminal open running > ''rails s'' all the time and another to actually work on? > > As anyone can tell I am a total newbie to Ruby on Rails but I am keen > to learn and very much appreciate any help with my dumb starter > questions!! > > Thanks > > Matt > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Maksim Gudovsikov
2010-Oct-08 10:05 UTC
Re: Newbie! How to return to the command prompt after launching rails server
Am 07.10.2010 23:22, schrieb Murph2m:> This has all worked great and I now need to generate the next bit of > scaffolding but I don''t know how to get back to the command prompt > after using ''rails s'' . I know I could launch another terminal session > but is this the only way? Will I be leaving one terminal open running > ''rails s'' all the time and another to actually work on?Hi, you can stop the server with Ctrl+C. If you want to let you application run all the time in the background just open a new terminal. Another solution would be to start the server as a deamon ''rails s -d''. But i would recommend you to let the server output in its own terminal so you can see if something is going wrong. Regards, Max. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Premanshu Mishra
2010-Oct-08 10:33 UTC
Re: Newbie! How to return to the command prompt after launching rails server
Hey Matt, Are you using RoR on Windows platform and MySQL as the db?? Curiously !! I''m using the same and have troubles starting with my first application in RoR..Even I''m a newborn to Ruby on Rails.... -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Murph2m
2010-Oct-08 11:54 UTC
Re: Newbie! How to return to the command prompt after launching rails server
Hi Premanshu, No I am running on a Mac with Snow Leopard but it is using mysql I believe. On Oct 8, 11:33 am, Premanshu Mishra <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hey Matt, > > Are you using RoR on Windows platform and MySQL as the db?? Curiously !! > I''m using the same and have troubles starting with my first application > in RoR..Even I''m a newborn to Ruby on Rails.... > -- > Posted viahttp://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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
gezope
2010-Oct-08 23:12 UTC
Re: Newbie! How to return to the command prompt after launching rails server
Hi, 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). Good idea, to run the server in a console, and work in another one, it''s just a trick, not essential. good luck, gezope On okt. 7, 22:22, Murph2m <murp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi > > I am following the Ruby on Rails Tutorial: Learn Rails by Example > > I am on chapter 2 creating the demo app using scaffolding and have > generated the user scaffold, migrated the database using Rake and then > run the local webserver using ''rails s'' > > This has all worked great and I now need to generate the next bit of > scaffolding but I don''t know how to get back to the command prompt > after using ''rails s'' . I know I could launch another terminal session > but is this the only way? Will I be leaving one terminal open running > ''rails s'' all the time and another to actually work on? > > As anyone can tell I am a total newbie to Ruby on Rails but I am keen > to learn and very much appreciate any help with my dumb starter > questions!! > > Thanks > > Matt-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Robert Walker
2010-Oct-09 00:17 UTC
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Murph2m
2010-Oct-09 08:02 UTC
Re: Newbie! How to return to the command prompt after launching rails server
Hey Everyone, Thanks so much for all the responses, some really helpful stuff! This is the first time I''ve posted on here and I''m blown away at how good the support community is! Zoltan I have copied your note so that I can install passenger when I understand a bit more about what I am doing - Thanks so much for this. Matt On Oct 9, 1:17 am, Robert Walker <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> 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 viahttp://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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.