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 Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Set up Git and Add Gems

HELP!!

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
Maciej Czuchnowski
36,441 Points

I would ignore the whole bin/ thing. Try that. Just write rails generate rspec:install.

Justin Horner
STAFF
Justin Horner
Treehouse Guest Teacher

Hello 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.

Thanks Justin, however I am already in by projects\odot directory however bin was still not recognised.

Justin Horner
Justin Horner
Treehouse Guest Teacher

When looking at your Rails app folder structure in Finder or Windows Explorer, do you see the bin folder? Are you using Rails 4?

I 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
Justin Horner
Treehouse Guest Teacher

That'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.

Is there any alternative way of create the spec folder with the spec helper?

If 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).