Rails 打印出一堆不必要的东西
当我使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如评论者(消费者)所说,这是重复的,但最简单的事情是将你的 rubygems 恢复到一个不那么令人沮丧的版本,直到尘埃落定
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)