Search⌘ K
AI Features

Running the Application with the bin/run Command

Discover how to run your Ruby on Rails application efficiently using a custom bin/run script. This lesson helps you create a simple, executable bash script to start your Rails server, ensuring a consistent and sustainable developer workflow. You will understand how this approach reduces setup complexity and supports team collaboration by maintaining a stable development environment.

We'll cover the following...

Let’s run our application

Currently, we can run our Rails app like so:

 bin/rails server --binding=0.0.0.0

While this is easy enough to remember, our app will one day require more complex commands to run it locally. Following our pattern of using scripts instead of documentation, we’ll create bin/run to wrap bin/rails server.

This will be a bash script since it currently just needs to run one ...