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't run bin/rspec spec/features/todo_lists/create_spec.rb
Hey!
When I try to run the command <code>bin/rspec spec/features/todo_lists/create_spec.rb</code> from my command prompt on windows 8.1 I get the error <code>'bin' is not recongnized as an internal or external command, operable program or batch file.</code>
Is there a way to fix this? It does not work to <code>cd</code> into the bin dir and then run <code>rspec ../spec/features/todo_lists/create_spec.rb</code>
Thanks, Fredrik A. Madsen-Malmo
3 Answers
Noah A
4,144 PointsHey Fredrik (eller Hallo, hvordan har du det!),
I had the same issue. It turns out (if I am not mistaken) that Jason Seifer simply has his directories set up differently than what we might have it. Thus, simply drop the bin
and you'll be all set. This is what I did, and it's worked like a charm ever since; I've had no issues continuing the lessons.
I hope this helps. :)
Ethan Lowry
Courses Plus Student 7,323 PointsThis is the same as your other question in that Rspec is not on your system PATH. You're not meant to have to be in any particular directory or have to to specify 'bin' to use these commands. It seems your Ruby / Rails environment may not have been set up correctly - all gems you install (such as Rspec in this case) should automatically be added to your Path rather than having to add them manually. Maybe look into using RVM to manage your Ruby and gems as this should ensure everything you need is on your Path.
Fredrik August Madsen-Malmo
16,261 PointsHey, would you recommend me using my MacBook instead of Windows? I have heard that this is supposed to be easier. If that is the case, should I still use RVM?
Ethan Lowry
Courses Plus Student 7,323 PointsAbsolutely yes - Mac makes life a lot easier for Ruby development (and development in general really - most Ruby companies exclusively use either Mac or Linux ) than Windows, which can be a confusing nightmare sometimes, so its not surprising you've run into issues like this. And yeah, RVM is still great for Mac.
Fredrik August Madsen-Malmo
16,261 PointsWell, shit. I've been trying for a couple of hours now to fix the <code>PATH</code> issue without any success. Decided to grab my MacBook Air and everything works like a charm. God damn it
David Gross
19,443 PointsHave you checked in your terminal if its in the bin directory ?
which rspec
Fredrik August Madsen-Malmo
16,261 PointsThanks for the quick answer. I'll check this when I get home.
Fredrik August Madsen-Malmo
16,261 PointsFredrik August Madsen-Malmo
16,261 PointsAha, thanks for clearing that up. During the course I ran into a ton of problem with outdated gems which were no longer availible, so I ended up quitting the course and going back to front-end development.
Langt mellom nordmennene her :)