【问题标题】:Psych error when using whenever gem in ruby每当在红宝石中使用宝石时出现心理错误
【发布时间】:2014-02-10 19:41:03
【问题描述】:

我正在尝试在 ruby​​ 中使用when gem。我安装了最新版本(0.9.0)。我也创建了 schedule.rb 文件。但是,无论何时命令似乎都不是从命令行工作的。我试过whenever --update-crontab 甚至whenever -- help 但都给了我以下错误:

/usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/psych.so: warning: already initialized constant Psych::Parser::ANY
/usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/psych.so: warning: already initialized constant Psych::Parser::UTF8
/usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/psych.so: warning: already initialized constant Psych::Parser::UTF16LE
/usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/i686-linux/psych.so: warning: already initialized constant Psych::Parser::UTF16BE
/usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/psych/syntax_error.rb:5:in `<module:Psych>': superclass mismatch for class SyntaxError (TypeError)
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/psych/syntax_error.rb:1:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/psych.rb:1:in `require'
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/psych.rb:1:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.13/lib/active_support/core_ext/big_decimal/conversions.rb:4:in `require'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.13/lib/active_support/core_ext/big_decimal/conversions.rb:4:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.13/lib/active_support/core_ext/big_decimal.rb:1:in `require'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.13/lib/active_support/core_ext/big_decimal.rb:1:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.13/lib/active_support/core_ext.rb:2:in `require'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.13/lib/active_support/core_ext.rb:2:in `block in <top (required)>'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.13/lib/active_support/core_ext.rb:1:in `each'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.13/lib/active_support/core_ext.rb:1:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.13/lib/active_support/all.rb:3:in `require'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.13/lib/active_support/all.rb:3:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/whenever-0.8.4/lib/whenever.rb:2:in `require'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/whenever-0.8.4/lib/whenever.rb:2:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/whenever-0.8.4/bin/whenever:4:in `require'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/whenever-0.8.4/bin/whenever:4:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/bin/whenever:23:in `load'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/bin/whenever:23:in `<main>'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>'

我什至卸载了 psych 并重新安装了它,但它似乎不起作用。我在 rails 3.2.13 和 ruby​​ 2.0

【问题讨论】:

    标签: ruby-on-rails ruby ruby-on-rails-3 rubygems whenever


    【解决方案1】:

    卸载了psych,现在可以使用了。

    gem uninstall psych
    

    【讨论】:

      猜你喜欢
      • 2019-08-09
      • 1970-01-01
      • 2011-04-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-07
      • 2012-12-25
      相关资源
      最近更新 更多