![](/img/trans.png)
[英]`require': cannot load such file — capybara/rspec (LoadError)
[英]`require': cannot load such file — cancan (LoadError)
我正在将CanCan gem与ActiveAdmin一起使用。 它按开发人员的预期运行,但是当推送到登台服务器时,出现以下错误:
`require': cannot load such file -- cancan (LoadError)
就我而言,这是由ActiveAdmin的CanCan适配器中的“ require”行引起的。
我已经在Google上搜索了可能的解释,但是空手而归。
这种错误可能是什么原因造成的,我该如何解决呢?
更新:
这是我的config/initializers/active_admin.rb
:
ActiveAdmin.setup do |config|
config.authentication_method = :authenticate_user!
config.authorization_adapter = ActiveAdmin::CanCanAdapter
config.cancan_ability_class = "Ability"
config.current_user_method = :current_user
config.logout_link_path = :destroy_user_session_path
config.allow_comments = false
config.batch_actions = true
end
重新启动整个计算机可以解决此问题。
我曾尝试重新启动nginx和unicorn,但尚未重新启动计算机本身。 无论出于何种原因,这都是成功的秘诀。
感谢您的想法/建议。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.