0

当我在 osx 上运行代码时,出现以下错误。相同的代码在 Linux 上运行良好。有什么问题?

Exiting
/Users/jagratishringi/.rvm/gems/ruby-1.9.2-p320@voylla/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require': no such file to load -- psych (LoadError)
    from /Users/jagratishringi/.rvm/gems/ruby-1.9.2-p320@voylla/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require'
    from /Users/jagratishringi/.rvm/gems/ruby-1.9.2-p320@voylla/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in `block in require'
    from /Users/jagratishringi/.rvm/gems/ruby-1.9.2-p320@voylla/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:223:in `block in load_dependency'
    from /Users/jagratishringi/.rvm/gems/ruby-1.9.2-p320@voylla/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:640:in `new_constants_in'
    from /Users/jagratishringi/.rvm/gems/ruby-1.9.2-p320@voylla/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:223:in `load_dependency'
    from /Users/jagratishringi/.rvm/gems/ruby-1.9.2-p320@voylla/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in `require'
    from /Users/jagratishringi/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/yaml.rb:16:in `yamler='
    from /Users/jagratishringi/work/voylla_website/config/environment.rb:12:in `<top (required)>'
    from /Users/jagratishringi/.rvm/gems/ruby-1.9.2-p320@voylla/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require'
    from /Users/jagratishringi/.rvm/gems/ruby-1.9.2-p320@voylla/gems/polyglot-0.3.3/lib/polyglot.rb:63:in `require'
    from /Users/jagratishringi/.rvm/gems/ruby-1.9.2-p320@voylla/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:240:in `block in require'
    from /Users/jagratishringi/.rvm/gems/ruby-1.9.2-p320@voylla/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:223:in `block in load_dependency'
    from /Users/jagratishringi/.rvm/gems/ruby-1.9.2-p320@voylla/gems/activesupport-3.1.10/lib/active_support/dependencies.rb:640:i
4

1 回答 1

0

在 Gemfile

请加

  1. gem "psych", "~> 2.0.0"
  2. bundle install
  3. rails s

谢谢

于 2013-08-27T09:46:19.707 回答