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 trialFredrik August Madsen-Malmo
16,261 PointsCan I navigate to the dir and then use rails generate instead of bin/rails generate?
Hey!
When I'm trying to type the <code>bin/rails generate</code> I get an error. Can I instead use <code>cd bin</code> and then use <code>rails generate</code>? I have used this method until now and it seems to work.
I was just wondering if I would get any problems later.
Thanks, Fredrik A. Madsen-Malmo
1 Answer
Ethan Lowry
Courses Plus Student 7,323 PointsThat would work yeah. The real answer though is that you shouldn't have to do either - Rails should be added to your PATH, so that you can use rails commands from anywhere without specifying the bin directory. For example, I can be in any directory and simply type 'rails generate' etc.
A quick google search for how to add rails to your path should turn up the solution, it's pretty straightforward.
Fredrik August Madsen-Malmo
16,261 PointsFredrik August Madsen-Malmo
16,261 PointsThanks!