Ruby on rails 活动管理:ApplicationController的副本已从模块树中删除,但仍处于活动状态

Ruby on rails 活动管理:ApplicationController的副本已从模块树中删除,但仍处于活动状态,ruby-on-rails,activeadmin,Ruby On Rails,Activeadmin,我有一个简单的rails应用程序,我添加了Active Admin onit,它运行得很好(除了我的css有一些问题),但在我尝试对dashboard.rb文件进行一些更改后,突然发现这个错误: 这是错误: [2016-02-16T18:56:55.902056 #5260] FATAL -- : ArgumentError (A copy of ApplicationController has been removed from the module tree but is still ac

我有一个简单的rails应用程序,我添加了Active Admin onit,它运行得很好(除了我的css有一些问题),但在我尝试对dashboard.rb文件进行一些更改后,突然发现这个错误:

这是错误:

[2016-02-16T18:56:55.902056 #5260] FATAL -- :
ArgumentError (A copy of ApplicationController has been removed from the module
tree but is still active!):
  app/controllers/application_controller.rb:26:in `notification'
我的应用程序\u controller.rb

class ApplicationController < ActionController::Base
  include PublicActivity::StoreController
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception
  skip_before_filter  :verify_authenticity_token
  helper_method :mailbox, :conversation
  before_action :set_last_seen_at, if: proc { user_signed_in? }
  before_action :notification, if: proc { user_signed_in? }
  private

  def mailbox
    @mailbox ||= current_user.mailbox
  end

  def conversation
    @conversation ||= mailbox.conversations.find(params[:id])
  end

  def set_last_seen_at
    current_user.update_attribute(:last_seen_at, Time.now)
  end

  def notification
    @shipment_ids = Shipment.where(:user_id => current_user.id).pluck(:id)
    @comment = Comment.where("shipment_id IN (?)", @shipment_ids).where(:is_read => false).where.not(:user_id => current_user.id)
  end
end
class ApplicationControllercurrent\u user.id)。Pull(:id)
@comment=comment.where((?),@shipping\u id)。where(:is\u read=>false)。where.not(:user\u id=>current\u user.id)
结束
结束

进行更改后您是否重新启动了服务器?您是否尝试过
spring stop
?在github页面上,我对它没有任何了解@jvillian:“Spring是Rails应用程序预加载程序。它通过让应用程序在后台运行来加快开发速度,这样您就不必在每次运行测试、rake任务或迁移时都启动它。”有时,当我遇到与预加载有关的问题时,我会在项目目录根目录的命令行中键入
spring stop
(这将使弹簧停止).Spring将在下次您在控制台上执行
rails c
时重新启动,尽管不是为了测试。这只是确保您的rails应用程序完全、干净地启动的一部分。您在进行更改后重新启动了服务器吗?您是否尝试过
Spring stop
?我在github页面上对它有什么不知道的@jvillian:“Spring是Rails应用程序预加载程序。它通过让应用程序在后台运行来加快开发速度,这样您就不必在每次运行测试、rake任务或迁移时都启动它。“有时,当我遇到可能与预加载有关的问题时,我会在项目目录根目录的命令行中键入
spring stop
(这将停止spring).Spring将在下次您在控制台执行rails c时重新启动,尽管不是为了测试。这只是确保您的rails应用程序有一个完整、干净的开始的一部分。