Skip to content
Create a gist now

Instantly share code, notes, and snippets.

rake fails until you delete the original .gemspec file
C:\installs\trunk3_installed>cd bin
C:\installs\trunk3_installed\bin>rake -T
C:/installs/trunk3_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/trunk3_installed/bin/rake:19:in `<main>'
C:\installs\trunk3_installed\bin>cd ..
C:\installs\trunk3_installed>cat ./lib/ruby/gems/1.9.1/specifications/rake.gemspec
Gem::Specification.new do |s|
s.name = "rake"
s.version = "0.8.7"
s.summary = "This rake is bundled with Ruby"
end
C:\installs\trunk3_installed>rm ./lib/ruby/gems/1.9.1/specifications/rake.gemspec
C:\installs\trunk3_installed>cd bin
C:\installs\trunk3_installed\bin>rake -T
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
C:/installs/trunk3_installed/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2377:in `raw_load_rakefile'
(See full trace by running task with --trace)
@ngzax
ngzax commented Oct 20, 2010

Thanks for posting this. It fixed a failing "gem install spork" for me.

@haf
haf commented Oct 25, 2010

Fail:
PS C:\Ruby192\bin> rake
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2377:in raw_load_rakefile'
(See full trace by running task with --trace)
PS C:\Ruby192\bin> rake --trace
rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2377:in
raw_load_rakefile'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2017:in block in load_rakefile'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2016:in load_rakefile'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2000:in
block in run'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in
run'
C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in <top (required)>'
C:/Ruby192/bin/rake:19:in
load'
C:/Ruby192/bin/rake:19:in `

'
PS C:\Ruby192\bin>

@rdp
Owner
rdp commented Oct 26, 2010

@haf this message usually means you're running rake with a "non standard" rake file or in the wrong directory.

@haf
haf commented Oct 26, 2010

@rdp it only came after removing the gemspec as shown above. What's a "non standard" rake file? I only have the default install and all I want to run is rake... starts crying

@rdp
Owner
rdp commented Oct 26, 2010

rake is working, but you typically run the "rake" command only within a folder that contains either a file named "rakefile" or "Rakefile" (see http://github.com/evanphx/rake ) so you're probably running rake with the wrong "current directory"

@rapcal
rapcal commented Mar 2, 2011

Thanks! Fixed spork gem installation for me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.