Problem with activesupport ruby 1.91 and rake
I have an installation of ruby 1.9.1
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]
when I try and run a rake task I am getting an error:
rake aborted!
no such file to load -- ftools
C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `block in require'
C:/Ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
C:/Ruby/lib/ruby/gems开发者_JAVA技巧/1.9.1/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
C:/Data/Checkouts/mvc2/Cms3/tools/rake/tasks.rb:4:in `<top (required)>'
C:/Data/Checkouts/mvc2/stonewarehouse/Rakefile.rb:5:in `require'
C:/Data/Checkouts/mvc2/stonewarehouse/Rakefile.rb:5:in `<top (required)>'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2383:in `load'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rakefile'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2017:in `block in load_rakefile'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2016:in `load_rakefile'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2000:in `block in run'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
C:/Ruby/lib/ruby/gems/1.9.1/gems/rake-0.8.7/bin/rake:31:in `<top (required)>'
C:/Ruby/bin/rake:19:in `load'
C:/Ruby/bin/rake:19:in `<main>'
any suggestions would be appreciated.
thanks.
The problem is not in ActiveSupport. It appears in the stack trace simply because it overrides the builtin Kernel#require
method.
The file "Cms3/tools/rake/tasks.rb" has require 'ftools'
on line 4, but ftools is deprecated in Ruby 1.9. Modify these tasks to use fileutils
instead and you'll be good to go.
精彩评论