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,694 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