RailsApps / learn-rails

An example Rails 5.1 app to accompany the "Learn Ruby on Rails" book.
https://learn-rails.com/install-rails-mac/index.html
392 stars 266 forks source link

Cloud9 Rails Server Command Not Set to Correct Port and IP to Preview #86

Open HFisher1212 opened 8 years ago

HFisher1212 commented 8 years ago

cloud9msg In LR B2 Ch6 "Viewing in the Web Browser" , when using the Cloud9 Hosting browser terminal the Preview window does not show the webpage created when command 'rails s' (or server) starts the rails server. For Cloud9, the server start line should be changed to 'rails s -p $PORT -b $IP'.

kwibus2000 commented 7 years ago

Is that an issue? You have to know that when you use Cloud9. Is it not mentioned in the book? Perhaps a 'tip' would be a good idea?

aspsa commented 7 years ago

In Cloud 9 start the rails server using the following command:

rails s -p $PORT -b $IP

To view your development Rails app in a web browser:

  1. Start the Rails server (see previous command).
  2. Click on 'Share' at the top to open the 'Share this workspace' dialog box.
  3. Click on the URL in the 'Application:' text field.
  4. Select 'Open' in the context menu that opens, which opens your Rails app in a browser window.

You should now see an instance of your development Rails web app running in the web browser.