开发者

Can't find rake on Ruby Rails Install

开发者 https://www.devze.com 2023-01-13 18:40 出处:网络
Microsoft Windows [Version 6.0.6002] Copyright (c) 2006 Microsoft Corporation.All rights reserved. C:\\Windows\\system32>gem install rake
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\开发者_JS百科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/)


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.


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消