当我在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
答案 0 :(得分:0)
在Gemfile中
请添加
gem "psych", "~> 2.0.0"
bundle install
rails s
由于