tags:

views:

1188

answers:

3
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>gem install rake
Successfully installed rake-0.8.7
1 gem installed
Installing ri documentation for rake-0.8.7...
Installing RDoc documentation for rake-0.8.7...

C:\Windows\system32>rake
C:/Program Files (x86)/Ruby192/lib/ruby/1.9.1/rubygems.rb:340:in `bin_path': can
't find executable rake for rake-0.8.7 (Gem::Exception)
        from C:/Program Files (x86)/Ruby192/bin/rake:19:in `<main>'

C:\Windows\system32>

Why can't my system find the rake command? Where should I start debugging the problem?

Update 1

I'm using ruby 1.9.2 and installed it using the ruby installer for windows (http://rubyinstaller.org/)

A: 

What is your PATH like? Run the following command.

echo %PATH%

Ruby on Windows is very tricky. It's not exactly designed for something like this. There are three major ways people get Ruby installed. First, they download straight binaries and try to hack together something workable. Second, they use the old one-click installer. Third, they use the new Ruby installer. If you have anything else, get rid of it and go with the third option.

AboutRuby
+3  A: 

You cannot install Ruby (or RubyGems) in a path with whitespace.

Jörg W Mittag
i had suspicion of this, but didn't have a change to try it out before i saw your answer. good to know. :)
Derick Bailey
+6  A: 

Hello,

This issue is a problem of Ruby 1.9.2 bundled version of Rake. You will need to remove the included rake.gemspec from the gem specification folder.

See this thread at RubyInstaller group, and specifically this link from Ruby-Forums for the solution.

BTW: a recommendation: avoid installing Ruby into path with spaces (Program Files). I forsee lot of problems with your installation in the future.

Luis Lavena
Thanks, this fixed my problem!
Alex Baranosky