Running Wrong Application

rails
workspace
ruby

#1

Hi everyone,

I’m having a bit of trouble running rails applications. In the terminal I am working on “rails_projects/alpha_blog”, which is the application I intend to run. Every time I hit “Run Project” it runs the “test_app” project. I even switched the CWD to “rails_projects/alpha-blog”. Also, when I type in “rails s -b 0.0.0.0” into the terminal, the application does not run. I’m very confused as to how I run solely the application by which I am working on. Both “test_app” and “alpa-blog” are folders within the “rails_projects” folder. I suppose I have to figure out how to differentiate between which file I tell Cloud9 to run.

Thank you for your help in advance!


#2

Can you attach a screenshot of just barely before and just after you run? It could be how your default run configuration is setup (see workspace settings in the top right).


#3

Does that work?


#4

Can you check if this will work from the terminal? Have a look at Running a Rails App and make sure to cd into the directory your project is in.


#5

Yes! Worked. Any reason why “rails s -b 0.0.0.0” doesn’t run the application, but “rails s -b $IP -p $PORT” does?


#6

Because only certain ports are available to run an application on so you must specify the port using $PORT. Glad it worked out :wink: