Mike
Mike

Reputation: 19697

Rake failing to start

I'm having trouble understanding the following error with Ruby's Rake.

C:\>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:\>rake
C:/Ruby192/lib/ruby/1.9.1/rubygems.rb:340:in `bin_path': can't find executable r
ake for rake-0.8.7 (Gem::Exception)
        from C:/Ruby192/bin/rake:19:in `<main>'

Running Ruby 1.9.2 for Windows.

Edit: Installing from source yields:

C:\Documents and Settings\XPherior\Desktop\rake-0.8.7\rake-0.8.7>ruby install.rb

<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
ftools (LoadError)
        from <internal:lib/rubygems/custom_require>:29:in `require'
        from install.rb:3:in `<main>'

Upvotes: 1

Views: 1251

Answers (2)

chrismartinawesome
chrismartinawesome

Reputation: 19

I've run into your both errors.

For the first one. Try the solution post at here http://betterlogic.com/roger/2010/11/ruby-1-9-2-rake-woe/.

And for the second error, it's causes by a library update by the ruby 1.9. From the Programming Ruby 1.9, "ftools have been removed (and replaced by fileutils)." I'm not pretty sure but at least that's an explanation.

Upvotes: 1

Derick Bailey
Derick Bailey

Reputation: 72858

The second error, where you have installed into C:\Documenets And Settings\ is occurring because you cannot install ruby into a folder with a space in the path. It should be installed into c:\Ruby\ c:\Ruby#.#.#\ if you want the version # in the path, or something along those lines.

for the first error: there is a bug in the rubyinstaller.org version of ruby 1.9.2, which is causing this by running "gem install rake".

you can read about the error you're getting, here: http://redmine.ruby-lang.org/issues/show/3677

there are a couple of ways to fix this error:

  • re-install ruby v1.9.2 and don't run "gem install rake". rake v0.8.7 is built into the ruby v1.9.2 installation, so you don't need to re-install it.
  • if you do want to manually install it, you can delete the ruby.gempspec file from your ruby installation. this file is located at (rubyinstalldir)\lib\ruby\gems\1.9.1\specifications

either of these options will fix the problem for you.

i'm not sure which is "better" off-hand... it may be necessary to delete the gemspec file and reinstall rake, to support updates and new versions in the future. i'm not sure, though. we'll find out once rake is updated and we need to install a new version. or, perhaps, the issue will be fixed in the ruby installation by then, and we'll just need to update our ruby install.

Upvotes: 4

Related Questions