错误无法加载此类文件 - user_agent / browsers / playstation(LoadError)

时间:2015-10-12 15:43:49

标签: ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-4

在跑道s或轨道c中 在项目ruby v2.1.4和rails 3.2.13

  

/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in require': cannot load such file -- user_agent/browsers/playstation (LoadError) from /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in阻止在'需要'       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in load_dependency' from /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in require'       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/useragent-0.16.0/lib/user_agent/browsers.rb:12:in <top (required)>' from /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in require'       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in block in require' from /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in load_dependency'       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in require' from /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/useragent-0.16.0/lib/user_agent.rb:2:in'       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in require' from /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in块中的'require'       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in load_dependency' from /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in require'       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/useragent-0.16.0/lib/useragent.rb:1:in <top (required)>' from /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in require'       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in block in require' from /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in load_dependency'       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in require' from /home/kop/rails/howtobuyafranchise/lib/franchise_core/lib/franchise.rb:11:in'       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in require' from /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/bundler-1.10.6/lib/bundler/runtime.rb:76:in块(2级)in require “       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in each' from /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/bundler-1.10.6/lib/bundler/runtime.rb:72:in阻止在'需要'       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in each' from /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/bundler-1.10.6/lib/bundler/runtime.rb:61:in require'       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/bundler-1.10.6/lib/bundler.rb:134:in require' from /home/kop/rails/howtobuyafranchise/config/application.rb:7:in'       来自/home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/railties-3.2.13/lib/rails/commands.rb:39:in require' from /home/kop/.rvm/gems/ruby-2.1.4@rails3213/gems/railties-3.2.13/lib/rails/commands.rb:39:in'       来自script / rails:6:require' from script/rails:6:in'

我不知道修复此错误 请帮助我

1 个答案:

答案 0 :(得分:0)

我认为文件路径错误, 而不是:user_agent/browsers/playstation 将其更改为:

useragent/browsers/playstation

由于我不知道你的Gemfile中有什么,我对这个错误的一个假设是你没有在你的Gemfile中包含gem 'useragent', '~> 0.14.0'然后运行bundle install