Sidekiq UI没有加载资产(Rails 3)

时间:2023-01-16 16:06:37

I am using Sidekiq in a Rails app and am having troubles getting the UI working.

我在Rails应用程序中使用Sidekiq并且在使用UI时遇到麻烦。

When I go to http :// servername/sidekiq the sinatra app loads, but looks like this: http://cl.ly/NHBT

当我转到http:// servername / sidekiq时,sinatra app会加载,但看起来像这样:http://cl.ly/NHBT

The error in the log is:

日志中的错误是:

Started GET "/sidekiq/javascripts/application.js" for 127.0.0.1 at 2013-03-01 11:32:48 -0700

在2013-03-01 11:32:48 -0700开始获取127.0.0.1的“/sidekiq/javascripts/application.js”

NoMethodError (undefined method empty?' for #<Rack::File:0x007faf004527c8>): bullet (4.3.0) lib/bullet/rack.rb:31:inempty?' bullet (4.3.0) lib/bullet/rack.rb:12:in call' warden (1.2.1) lib/warden/manager.rb:35:inblock in call' warden (1.2.1) lib/warden/manager.rb:34:in catch' warden (1.2.1) lib/warden/manager.rb:34:incall' actionpack (3.2.8) lib/action_dispatch/middleware/best_standards_support.rb:17:in call' rack (1.4.5) lib/rack/etag.rb:23:incall' rack (1.4.5) lib/rack/conditionalget.rb:25:in `call'

NoMethodError(未定义的方法为空?对于# ):bullet(4.3.0)lib / bullet / rack.rb:31:inempty?' bullet(4.3.0)lib / bullet / rack.rb:12:in call'warden(1.2.1)lib / warden / manager.rb:35:inblock in call'warden(1.2.1)lib / warden / manager .rb:34:in catch'warden(1.2.1)lib / warden / manager.rb:34:incall'actionpack(3.2.8)lib / action_dispatch / middleware / best_standards_support.rb:17:all in call'rack(1.4 .5)lib / rack / etag.rb:23:incall' rack(1.4.5)lib / rack / conditionalget.rb:25:in`call'

Any ideas? Thanks!

有任何想法吗?谢谢!

3 个解决方案

#1


2  

I've had the same issue as well. Appearently, the Bullet gem is causing this.

我也有同样的问题。显然,Bullet宝石正在造成这种情况。

For now I've just decided to disable Bullet, because there's no way on the documentation to skip Bullet for mounted apps or similar configuration.

目前我刚刚决定禁用Bullet,因为文档上没有办法跳过安装应用程序或类似配置的Bullet。

#2


1  

My original problem ended up being solved with a newer release of sidekiq

我最初的问题最终被更新版的sidekiq解决了

#3


0  

Well, I'm still having the issue, but came up with the following workaround:

好吧,我仍然遇到了这个问题,但提出了以下解决方法:

Add to config/initializers/sidekiq_bullet_workaround.rb (or similiar):

添加到config / initializers / sidekiq_bullet_workaround.rb(或类似):

module Rack
  class File
    def empty?
      false
    end
  end
end

#1


2  

I've had the same issue as well. Appearently, the Bullet gem is causing this.

我也有同样的问题。显然,Bullet宝石正在造成这种情况。

For now I've just decided to disable Bullet, because there's no way on the documentation to skip Bullet for mounted apps or similar configuration.

目前我刚刚决定禁用Bullet,因为文档上没有办法跳过安装应用程序或类似配置的Bullet。

#2


1  

My original problem ended up being solved with a newer release of sidekiq

我最初的问题最终被更新版的sidekiq解决了

#3


0  

Well, I'm still having the issue, but came up with the following workaround:

好吧,我仍然遇到了这个问题,但提出了以下解决方法:

Add to config/initializers/sidekiq_bullet_workaround.rb (or similiar):

添加到config / initializers / sidekiq_bullet_workaround.rb(或类似):

module Rack
  class File
    def empty?
      false
    end
  end
end