Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Ruby {rails} cmd prompt issue
I am using a windows computer and there are two things..my control c does not shut down the server and once I start the server through the prompt I am not able to type anything else in the command prompt without first closing out and then reopening the prompt, is this normal? or is there some kind of solution that someone may know of. Thank you in advance!
6 Answers
Njeri Chelimo
6,860 PointsHey Blake. Ctrl + R will top the server in a Mac and Linux OS. I have never ran Windows on my machine, but from what I know, Ctrl+Pause/Break will stop the server in Windows. Please give that I try and hopefully, it will work ;) .
About not being able to type anything else when the server is running, I am not quite sure what you mean. Is it that you cannot type anything else in the particular terminal tab that the server is running, or that you cannot type anything even after you open another tab? If the first explanation is the right one (which I bet it is), simply open another terminal tab, and all be back to normal. :)
hmm unfortunately I do not have a pause/break on my laptop..and I was referring to not being able to type anything in that particular terminal tab the server is running..I guess I can just close out of the terminal each time worst case
In response to my own question I have found the fix for windows users in case anyone else is interested and is having this problem..
The Fix for me at least:
instead of starting the the rails server with 'rails server' command go ahead and type 'ruby script/rails server' and then control + C should be able to shut down the server through the command prompt that way, at least for windows users
Nick Pettit
Treehouse TeacherHi Blake,
Glad you were able to find the solution to that. To answer your other question: Yes, it is normal to not be able to type anything else into the command prompt once you start a task like running a server.
On Windows, you should be able to open multiple instances of the command prompt. Once you start a server in one, just open a new command prompt window to type additional commands.
Awesome, yeah I started realizing that it was not possible while the server was running..Thank you for taking the time to respond.
Njeri Chelimo
6,860 PointsBlake, thanks for sharing the solution you found! :)