Rails 打印出一堆不必要的东西

发布于 2024-11-09 08:07:11 字数 6427 浏览 0 评论 0原文

当我使用 Rails 或 Rake 执行任何命令时,它每次都会打印出大量弃用警告。我只是通过敏捷书学习 Rails...我不需要不断地费力地完成所有这些。

这是“rake test”的输出。请问,有人可以告诉我这是什么以及如何阻止它吗?

raben-brodies-macbook:depot Ben$ 耙子测试 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11 调用。 (在 /Users/Ben/Documents/Programming/agile_web_projects/depot 中) 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11 调用。 加载套件 /Users/Ben/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader 开始 。 0.031176 秒内完成。

1 次测试、1 次断言、0 次失败、0 次错误 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11 调用。 加载套件 /Users/Ben/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader 开始 ………… 用时 0.231249 秒完成。

7 次测试,10 次断言,0 次失败,0 次错误 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10 调用。 注意:Gem::Specification#default_executable= 已弃用且无替代品。将于 2011 年 10 月 1 日或之后删除。 Gem::Specification#default_executable= 从 /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11 调用。 ben-brodies-macbook:depot Ben$

When I do any command with rails or rake, it prints out tons of deprecation warning every single time. I am simply learning rails with the agile book... I do not need to wade through all this constantly.

Here is the output of "rake test". Please, can somebody tell me what this is and how to stop it?

raben-brodies-macbook:depot Ben$ rake test
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11.
(in /Users/Ben/Documents/Programming/agile_web_projects/depot)
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11.
Loaded suite /Users/Ben/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
.
Finished in 0.031176 seconds.

1 tests, 1 assertions, 0 failures, 0 errors
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11.
Loaded suite /Users/Ben/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader
Started
.......
Finished in 0.231249 seconds.

7 tests, 10 assertions, 0 failures, 0 errors
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/Ben/.gem/ruby/1.8/specifications/treetop-1.4.9.gemspec:11.
ben-brodies-macbook:depot Ben$

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

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

发布评论

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

评论(1

空气里的味道 2024-11-16 08:07:12

正如评论者(消费者)所说,这是重复的,但最简单的事情是将你的 ruby​​gems 恢复到一个不那么令人沮丧的版本,直到尘埃落定

gem update --system 1.7.2 (甚至 1.6.2)

It's a duplicate as the commenter (spender) said, but the simplest thing is to revert your rubygems to a less frustrating version until the dust settles

gem update --system 1.7.2 (or 1.6.2 even)

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