3

I just started learning rails a week ago and everything worked until today. Now when I start the Ruby command prompt, it says:

The system cannot find the path specified.

# Under Rails Environment Configuration.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.

---

The paths for ruby and rails show up correctly.

I'm using Windows Vista 32-bit. Any help would be greatly appreciated, thanks!

Lukas Stejskal
  • 2,542
  • 19
  • 30
mikey10
  • 31
  • 1
  • 1
  • 2
  • can you give more info about your environment? – Jim Deville Jul 09 '11 at 23:13
  • I'm using Rails 3.0.7, Ruby 1.8.7, git for version control and Heroku for deployment. I tried uninstalling Rails Installer and reinstalling, but the same exact problem persists. – mikey10 Jul 14 '11 at 16:53
  • No ideas? I cannot git commit or push to Heroku without this message popping up again and again. – mikey10 Jul 18 '11 at 14:39
  • I'm pretty sure it has something to do with git. Whenever I try to commit or do anything git related, the message would pop up. Any ideas? – mikey10 Jul 24 '11 at 17:04

3 Answers3

24

You've probably used "Ansicon" - a program to get the colors in windows prompt right. If you installed it permanently with -i parameter and consequently moved/deleted its directory, it would lead to this error. (I've just experienced it)

The solution is to renew the location of the ansicon data files or to remove the following registry entry:

HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun

You can find more on this issue at http://carol-nichols.com/2011/03/17/the-system-cannot-find-the-path-specified/

Good luck!

Sawny
  • 1,404
  • 2
  • 14
  • 31
Juraj Masar
  • 241
  • 1
  • 2
  • I've been looking for the answer for this for hours! Thank you! – vmrob Feb 20 '13 at 16:35
  • This solution also worked for failing node pre-commit hooks as discussed [here](https://github.com/pre-commit/mirrors-prettier/issues/18) and [here](https://github.com/pre-commit/pre-commit/issues/2402). – Roald May 23 '22 at 19:45
2

I had the same problem in Windows 7 and solved it by adding Git/bin directory to the system path variable (found the answer here). Hope this helps someone!

0

None of the answers above helped me. My issue was whenever i typed rail -v it gave me the same error. I had to install rails, i used the following command:

gem install rails --no-document

you can check out the following installation steps to get around the error:

http://docs.railsbridge.org/installfest/windows

iceveda06
  • 601
  • 8
  • 21