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 trialMAM khan
261 Points'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.
3 Answers
Jeremy Kerrigan
12,002 PointsJust 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
Ajinkya Borade
Courses Plus Student 16,635 PointsFirst 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
MAM khan
261 PointsNow 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
Ajinkya Borade
Courses Plus Student 16,635 Pointsjust 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
MAM khan
261 PointsThank 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
Ajinkya Borade
Courses Plus Student 16,635 Pointsput the exact path to your ruby. and restart machine after adding ENV path
Will Berlanga
18,825 PointsWill Berlanga
18,825 Pointsbin is the file path where you want to run your rails server command. Try changing the path to bin.