Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't find rake on Ruby Rails Install

Tags:

ruby

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\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/)

like image 691
Levi Hackwith Avatar asked Sep 01 '10 01:09

Levi Hackwith


People also ask

Is Rake included with Ruby?

Rake can be downloaded and included in ruby projects as a ruby gem. Once installed, you define tasks in a file named "Rakefile" that you add to your project.

How do I run a Rake task in Ruby on Rails?

Go to Websites & Domains and click Ruby. After gems installation you can try to run a Rake task by clicking Run rake task. In the opened dialog, you can provide some parameters and click OK - this will be equivalent to running the rake utility with the specified parameters in the command line.

What is Rake in Ruby on Rails?

Rake is a popular task runner for Ruby and Rails applications. For example, Rails provides the predefined Rake tasks for creating databases, running migrations, and performing tests. You can also create custom tasks to automate specific actions - run code analysis tools, backup databases, and so on.


1 Answers

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.

like image 198
Luis Lavena Avatar answered Sep 18 '22 01:09

Luis Lavena