繁体   English   中英

使用红宝石中的宝石时出现精神错误

[英]Psych error when using whenever gem in ruby

我正在尝试使用ruby中的每当宝石。 我安装了最新版本(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>'

我什至放心并重新安装了它,但是它似乎没有用。 我在3.2.13和ruby 2.0的轨道上

卸载psych ,现在可以使用。

gem uninstall psych

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM