Ruby v1.9.2 On Windows: can’t find executable rake for rake-0.8.7

FYI – I saw this question over on StackOverflow and did a little bit of searching for the problem and workarounds. In searching for an answer, I found issue #3677 on the ruby-lang redmine site. It turns out there’s a bug in v1.9.2 of Ruby, at least for Windows and possibly for Linux and other systems, as well. There’s some interesting discussion on the issue and a few workarounds are posted.

It turns out Rake v0.8.7 is bundled with Ruby v1.9.2, which means you don’t need to run “gem install rake” for this version of ruby. If you do, though, you’ll end up getting an error like this:

C:/installs/ruby_trunk_installed/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:/installs/ruby_trunk_installed/bin/rake:19:in `<main>'

The two main workarounds for this are:

  1. Don’t run “gem install rake” on a ruby v1.9.2 installation. Since it’s built in, you don’t need to bother with this.
  2. If you do install rake (perhaps it got pulled down as a dependency of another gem), and you get this error, delete the rake.gemspec file located at (rubyinstalldir)librubygems1.9.1specifications

Either of these will prevent the problem, or fix the problem. Hopefully the underlying cause will be fixed in a patch of ruby v1.9.2. Until then, these options should work around the issue.

About Derick Bailey

Derick Bailey is an entrepreneur, problem solver (and creator? :P ), software developer, screecaster, writer, blogger, speaker and technology leader in central Texas (north of Austin). He runs - the amazingly awesome podcast audio hosting service that everyone should be using, and where he throws down the JavaScript gauntlets to get you up to speed. He has been a professional software developer since the late 90's, and has been writing code since the late 80's. Find me on twitter: @derickbailey, @mutedsolutions, @backbonejsclass Find me on the web: SignalLeaf, WatchMeCode, Kendo UI blog, MarionetteJS, My Github profile, On Google+.
This entry was posted in Rake, Ruby. Bookmark the permalink. Follow any comments here with the RSS feed for this post.