How Do I Re-Open an App in the Terminal, When I Restart Rails

Hi everyone,

I have a question, that I can’t seem to find an answer for anywhere. I might be missing something obvious, but the best way to find out is to ask. So, when I re-open Rails, and I want to go back into an application, what do I enter in the terminal? I understand I use “rails new _______” when I am creating a new app, but what about when I just want to reopen an existing one? It seems like “cd appname” doesn’t work either. I’d appreciate any help you can offer in this regard.

Thanks! Darren King

When you’re in the proper directory in the terminal you just need to start the server by running the command rails s. You’ll then see the application in your browser at localhost:8000

What are you actually trying to do? If you want to start the server again, then cd’ing to the folder containing the application and running “rails s” should do the trick. Whether or not that’s just “cd appname” depends on which directory you initially ran the rails new command from.

Fred

It is not clear what you mean by 'reopen rails'. Rails is not something you open. However, if you cd to the folder where where you ran rails new, then run cd appname. If cd appname shows an error then run ls and copy/paste the result here. Also tell us the path of the folder where you ran rails new.

If cd appname does not show an error then to start the server run rails s

I deduce, however, that you are an absolute beginner in rails, so suggest you start by working right through a good tutorial such as railstutorial.org. That will show you the basics of rails.

Colin