Ruby 1.9.2-p0 included some bundled gems (rake, rdoc and minitest). If
you happen to develop using Rails, will find that after installing
Rails, “rake” command might not work with the following output:
bin_path': can't find executable rake for rake-0.8.7 (Gem::Exception) from C:/Ruby192/bin/rake:19:in’
The issue was corrected in Ruby source code:
But during the backports, there was a confusion and it is still
present in latest 1.9.2-p136:
To solve this, you need to manually remove rake.gemspec,
minitest.gemspec and rdoc.gemspec files.
With the goal of making things simple, please copy the following into
“clean-gemspec.bat” file and place it in your Ruby 1.9.2 installation
ECHO This batch file will correct the non-versioned gemspecs distributed
ECHO by RubyInstaller 1.9.2-p136
ECHO Please place this file in the root directory of your Ruby 1.9.2
ECHO (C:\Ruby192 by default)
ECHO Removing minitest.gemspec from %ROOT%
DEL %ROOT%\minitest.gemspec /Q/F
ECHO Removing rake.gemspec from %ROOT%
DEL %ROOT%\rake.gemspec /Q/F
ECHO Removing rdoc.gemspec from %ROOT%
DEL %ROOT%\rdoc.gemspec /Q/F
ECHO Done. Thank you, and apologies for the problem.
Now, from a command prompt, and inside your Ruby 1.9.2 folder (“CD
C:\Ruby192”), please invoke the batch file:
The following will be displayed in your console:
This batch file will correct the non-versioned gemspecs distributed
by RubyInstaller 1.9.2-p136
Please place this file in the root directory of your Ruby 1.9.2 install
(C:\Ruby192 by default)
Press any key to continue . . .
Removing minitest.gemspec from
Removing rake.gemspec from C:\Ruby192\lib\ruby\gems\1.9.1\specifications
Removing rdoc.gemspec from C:\Ruby192\lib\ruby\gems\1.9.1\specifications
Done. Thank you, and apologies for the problem.
Once that is executed, rake should work again:
rake, version 0.8.7
Please apologize the problem this issue might have caused on your
Thank you for your time.