# Run Ruby on Rails/Sinatra app on Cloud9 IDE
I spent hours trying to run up a Ruby web server using Sinatra on Cloud 9. The cloud9 IDE instructions on the Output screen say:
Your code is running at [http://project-name.username.c9.io]
Important: use ‘ruby app.rb -p $PORT -b $IP’ to run your server apps!
None of above doesn’t work! There is no solution on cloud9 documentation!
In fact, these are the instructions for a Rails application, and the -b switch is invalid for Sinatra applications, which I figured out when using the terminal window!!!
“Error: you may be using the wrong PORT & HOST for your server app!” – Cloud9 yellled!
For rails, You should type:
$ rails server -p $PORT -b $IP’
=> Your rails app will UP and Running!
For make your Sinatra applications UP and Running type in the console:
$ ruby app.rb -p $PORT -o $IP
And that’s fixed! Check and star my gist.
“Try not to become a person of success, but rather try to become a person of value.” —Albert Einstein