message "<img src='img/successful_rails7_install.png' srcset='img/successful_rails7_install.png 1x, img/successful_rails7_install@2x.png 2x'>"
goals do
goal "Let's start and stop the server"
end
steps do
step do
message "Let's start the server"
console "rails server"
message "This will print some stuff and stay running forever, printing more stuff
every time you visit a page in your app. This terminal is blocked now, you will need another terminal for other work."
end
step do
text "Point your web browser to "
url "http://localhost:3000"
message "See your web app actually running!"
end
step do
message "While the server is running, whatever you type in that terminal tab
will be ignored."
message "To get back to the terminal, you can stop the server by typing
`Control-c`."
fuzzy_result <<-STOPPING_RAILS_SERVER
=== puma shutdown: {FUZZY}2024-10-22 15:25:32 +0200{/FUZZY} ===
- Goodbye!
Exiting
STOPPING_RAILS_SERVER
end
end
explanation do
message "`rails server` ran your application locally."
message "`Control-c` is a way of closing or cancelling terminal programs. Since
`rails server` runs forever, you need to interrupt it with `Control-c`."
end
takeaway do
message "From now on take care of keeping the server running while you are developing and want to try out the application in the browser"
end
next_step "creating_a_migration"