Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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