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

'bin' is not recognized as an internal or external command,

Running bin/rails server gives me the following error: (on windows)

"'bin' is not recognized as an internal or external command,operable program or batch file."

Any advise what might be wrong.

Will Berlanga
Will Berlanga
18,825 Points

bin is the file path where you want to run your rails server command. Try changing the path to bin.

3 Answers

Jeremy Kerrigan
Jeremy Kerrigan
12,002 Points

Just remove (bin/) from your bin/rails generate rspec:install. I have Win 7 and removing the bin/ works perfectly.

so enter: rails generate rspec:install

First add Environment path to ruby set PATH=%PATH%;C:\Ruby200-x64\bin

then it will be available for use in CMD. Use ruby directly inside CMD. not bin/ruby

This is how you add ENV path windows 7 Read here

Now I have lost Ruby too! (same error for ruby -v : 'Ruby' is not recognized as an internal or external command), :-(

My path reads as: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;c:\node.js;set PATH=%PATH%;C:\Ruby200-x32\bin;

and I have restarted too. Can you spot the error and thanks a lot for your time

just go to C drive check what is Ruby folder name.

put ENV varibale as it is: C:\Ruby200-x64\bin; remove set PATH=%PATH%;

or post screenshot of your C drrive here

Thank you Ajinkya for explaining.

I have windows10 32bit. I am opening environment system variable, path and edit. Another window opens for edit. I am appending () after a semi colon. I am not sure if I have to add 'set' or not, so I have tried it both ways. I also changed x64 to x32. I have tried this for a few hours but still I am getting the same error. Any insights on what I might be doing wrong here..

Any insights on what I might be doing wrong here

put the exact path to your ruby. and restart machine after adding ENV path