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 Practice Ruby on Rails Basics Practice Creating Apps Generating a Rails Scaffold

How do I find out what version of rails is running in: Practice Ruby on Rails Basics

I receive an incorrect answer when answering the scaffold question at the end of the Practice Ruby on Rails Basics course. I have input the correct answer: rails generate scaffold Employee name:string phone:string, yet the error says I need to run the rails version that is in the 'bin' subdirectory. I have tried to use the terminal given to try to figure this out but no dice. Im not sure what is required here since there's no realistic way of finding out the version of rails being used. Slightly ridiculous.

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,858 Points

Hi Shaun Richards

The error you're receiving isn't asking you to find out what version is being run, it is telling you to "run the version that's in the "bin" subdirectory."

When you use just rails generate, you are explicitly trying to run the rails executable, and this generally is not a good idea. What you should be doing is running the rails that is directly in the bin sub-directory of the project.
So, instead of rails generate you should be using bin/rails generate.

Hope that helps.

Otherwise, nice work! :) :dizzy: