Other Pages

Expand All

Running Your Application Locally


  • Let's fire up the application locally


Step 1

On Linux, you may have to enable this line in your Gemfile:

gem 'therubyracer', :platforms => :ruby

Just delete the '#' in front of the statement, then save the file. All that is left is to do a bundle install

Type this in the terminal:
bundle install
Type this in the terminal:
rails server

Step 2

Point your web browser to http://localhost:3000

See your web app actually running!

Step 3

When at the terminal with your running rails server, type Control-C to stop rails server. You can do this now.

Expected result:
^C[2022-03-31 08:33:11] INFO  going to shutdown ...
[2022-03-31 08:33:11] INFO  WEBrick::HTTPServer#start done.


rails server ran your application locally just like Heroku will be running it on their servers. A web server is the hardware (or software) that delivers content to you.

This provides a very simple means to see your changes before you commit and push them to Heroku.

Control-C is a way of closing or cancelling terminal programs. Since rails server runs forever, you need to interrupt it with Control-C.

Next Step:

Back to Add The Project To A Git Repo

If you find something that could be improved, please make a pull request or drop us a note via GitHub Issues (no technical knowledge required).

Source: https://github.com/RailsBridge-CapeTown