zoukankan      html  css  js  c++  java
  • How do I fix Rubygems recent deprecation warning? 规格严格

    http://stackoverflow.com/questions/5949521/how-do-i-fix-rubygems-recent-deprecation-warning

    http://stackoverflow.com/questions/5973104/how-to-get-rid-of-note-warning

    http://1pxsolid.tumblr.com/post/6520969646/fixing-the-ruby-gems-deprecation-warning

    为了安装Redmine,我下载了Ruby1.8.7,之前网上说应该下载RubyGem1.6.2,我不知道是因为我安装的机器是XP,别人的机器不是XP,总之

    我的人品很差,安装Rails没问题,当安装MySQL for Ruby时候,用的是2.8.1版本的Gem,总是不好用。后来参考cnblogs其他同仁们以及Redmine

    官网上说明,其实安装1.X版本只要控制在《=1.8版本就可以,于是我就是默认使用1.8.7自带的Gem为1.5.2,之后安装顺利结束。

    下班前,我们组长,一个很厉害的人(由于近期离职了),把之前安装Redmine的文档移交给另一个同事,我看了一下文档,发现他用的1.8的Gem,于是

    我晚上回来下了一个1.8.2,结果安装后运行也没问题,就是出了一大堆:

    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 E:/Ruby187/lib/ruby/gems/1.8
    specifications/rack-1.1.1.gemspec:10.
    NOTE: Gem::Specification#default_executable= is deprecated with no replacement.
    It will be removed on or after 2011-10-01.

    这可真不爽,于是Google之,发现其实还是类似于Java或者C中使用了过时的API了导致发出警告,解决办法在我上面的三个老外链接里面,

    我采用其中一种方法:

    C:\Documents and Settings\Administrator>gem pristine --all --no-extensions

    执行后,在也没有上述问题了。

    为了避免误导人,我刚才又运行了一下rake,发现运行一些命令时候也会出现警告,需要在寻求别的办法了。

    后记:

    安装Redmine最后时候,用1.8报错了,我安的是1.2的,结果出现:

    undefined method `name' for "actionmailer":String

    官网这么说的:

    http://www.redmine.org/issues/8325

    我还是老实的回退到1.5.2吧

  • 相关阅读:
    hdu 6201 dfs
    Oulipo POJ
    Kitchen Measurements UVALive
    Surf Gym
    hoj 13969 Racing Gems
    分块
    分块学习资料
    Jam's problem again HDU
    树的点分治
    Census UVA
  • 原文地址:https://www.cnblogs.com/diyunpeng/p/2346071.html
Copyright © 2011-2022 走看看