Other Pages

Expand All

running_your_application_locally.step

goals do
  goal "Let's fire up the application locally"
end


steps do
  step do
    console "rails server"
  end

  step do
    text "Point your web browser to "
    url "http://localhost:3000"

    cloud9_instruction do
      span " Click on Preview > Preview Running application"
    end


    p "See your web app actually running! It should look like this:"

    img src: "img/Start_page.png", alt: "Screenshot of a Ruby on Rails default home page"
  end

  step do
    message "When at the terminal where Rails server is running, you can always type **Control-C** to stop it. You can do this now."
    result <<-STOPPING_RAILS_SERVER
^CExiting
    STOPPING_RAILS_SERVER
  end
end

explanation do
  message "`rails server` ran your application locally just like Heroku will be running it on their servers."
  message "This provides a very simple means to see your changes before you commit and push them to Heroku."
  message "Control-C is a way of closing or cancelling terminal programs. Since `rails server` will run forever, you need to interrupt it with Control-C."
end

next_step "creating_a_migration"