activesupport ruby​​ 1.91 和 rake 的问题

发布于 2024-08-30 07:11:57 字数 1693 浏览 6 评论 0原文

我安装了 ruby​​ 1.9.1

ruby​​ 1.9.1p378 (2010-01-10 修订版 26273) [i386-mingw32]

当我尝试运行 rake 任务时出现错误:

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/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>'

任何建议将不胜感激。

谢谢。

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/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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

国粹 2024-09-06 07:11:57

问题不在于 ActiveSupport。它出现在堆栈跟踪中只是因为它覆盖了内置的 Kernel#require 方法。

文件“Cms3/tools/rake/tasks.rb”在第 4 行有 require 'ftools',但 ftools 是 在 Ruby 1.9 中已弃用。修改这些任务以使用 fileutils 代替,您就可以开始了。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文