Ruby Ruby on Rails 5 Basics Creating an App Creating a New App

What is the command ?

You need to run the "bin/rails" executable.

1 Answer

Jay McGavren
STAFF
Jay McGavren
Treehouse Teacher

I assume this question relates to Task 3 of the linked challenge:

Now that you're in the app directory, try running a web server.

The command for Task 1 was to create a new Rails app: rails new vet. Notice there's no bin/ on the start there. That's because no bin directory exists yet. When you run rails new vet, it creates a vet directory with a bin subdirectory. So you type cd vet to change into the vet directory.

From then on, all Rails commands you run need to start with the bin/rails executable. This ensures you're running the version of Rails within the bin subdirectory, and not some other version that might be elsewhere on your computer. So the full command for Task 3 is this:

bin/rails server