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 trialamo100
7,260 PointsHELP!!
Hi please can somebody help me... I am unable to add spec directory because when i do bin/rails generate rspec:install the bin is not recognized as an internal or external command.
5 Answers
Maciej Czuchnowski
36,441 PointsI would ignore the whole bin/ thing. Try that. Just write rails generate rspec:install
.
Justin Horner
Treehouse Guest TeacherHello Avi,
Before running the bin/rails generate command, make sure that you are in the directory of your rails app using the cd "Change Directory" command.
Once you are in your rails app directory, you should have no problem running your rails commands :)
I hope this helps. If not please let me know and we'll take the next step.
amo100
7,260 PointsThanks Justin, however I am already in by projects\odot directory however bin was still not recognised.
Justin Horner
Treehouse Guest TeacherWhen looking at your Rails app folder structure in Finder or Windows Explorer, do you see the bin folder? Are you using Rails 4?
amo100
7,260 PointsI tried that however my spec folder is still not being created and I am unable to find the solution. I was thinking maybe there is a problem when I am installing git as when I type 'git add .' many warning messages come up. Is this due to being on rails 4.1.6? Any help would be appreciated.
Justin Horner
Treehouse Guest TeacherThat's really strange behavior, especially from git add. Unfortunately, I've never encountered this before but I would say it might be worth creating a sample rails app to have a clean slate to find out if you have the same problem.
At the very least doing this might help you diagnose the issue in your current project.
amo100
7,260 PointsIs there any alternative way of create the spec folder with the spec helper?
Iain Simmons
Treehouse Moderator 32,305 PointsIf you're on Windows, you don't need to add bin/
before any rails command, just make sure you're in the odot
directory and just run rails generate rspec:install
.
As for Git errors, are they actually errors or just the warnings about line endings changing (often occurs on Windows machines due to line endings being different to Unix-based OSes like Mac OS X and Linux).
Chris Underwood
Full Stack JavaScript Techdegree Student 19,916 PointsChris Underwood
Full Stack JavaScript Techdegree Student 19,916 PointsThank you for this. I was pulling my hair out.