Bin / rails gives an error that "bin" is not recognized as internal
I am a beginner learning and doing Ruby on Rails tutorials ( http://guides.rubyonrails.org/getting_started.html#installing-rails )
and for all bin commands in command window like $ bin / rails --version or $ bin / rails server
I get the error "bin" is not recognized as an internal or external command, operating program, or batch file. '
I just installed the latest Ruby, so I tried to run rake rails: update: bin
and I also added the PATH variable C: \ RailsInstaller \ Ruby1.9.3 \ bin to my environment variables.
I am still getting the same error.
Thank you in advance!
If you've added the directory bin
to your variable PATH
, you don't need to use it in the command. Just enter $ rails --version
etc.
You are getting these errors because you are on Windows. In this case, you must pass the scripts in the folder bin
directly to the Ruby interpreter like this:
ruby bin\rails server