我们在生产服务器上使用了sidekiq,包括nginx,haproxy,thin。此外,我们还为通过身份验证的管理用户(Activeadmin)使用了sidekiq UI:
authenticate :admin_user do
mount Sidekiq::Web => '/sidekiq'
end
身份验证之后,我们尝试打开/sidekiq。我们只收到“禁止的”,而不是看到侧翼用户界面。此外,我们失去了设计会话。因此,如果我们尝试打开/admin,activeadmin再次需要身份验证。
我们只在生产服务器上面对这个问题,在dev上它工作得很好。
我们使用: ng
我正在做一个项目,其中我有一个CSV上传类方法import_listings(file),这个方法是由Sidekiq方法调用的。
class CsvWorker
include Sidekiq::Worker
sidekiq_options retry: false
def perform(file)
#call import listings class method on the file.
imported = Listing.import_listings(file)
# return true
最近,我尝试克隆我的代理的存储库,我在ActiveAdmin和Ransack上发现了这个错误。
我试着清理缓存,更改Gemfile上的activeadmin版本,删除修改.我找不到解决这个问题的办法:
➜ bundle
The git source `git://github.com/activeadmin/activeadmin.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure t
我正在开发一个使用ActiveAdmin的ROR应用程序。我正在尝试使用批处理操作删除用户。它显示了成功的消息,但实际上它并没有从数据库中删除用户(postgres)。 以下是批处理操作的代码- batch_action :destroy, :confirm => "Are you sure you want to delete the user?", do |ids|
Application::RecordsDestroy.perform_async Application::User, ids
redirect_to user_path, :notice
我正在做一个项目,并试图为它写一些测试。目前我正在做特性测试。
问题是:我只是不能使用访问。不管我在哪里用它。我收到错误:ActionController::RoutingError:没有路由匹配GET "/"。
下面是测试的一个简单示例:
require 'rails_helper'
RSpec.feature "Welcome", type: :feature do
context 'sign in user and load index' do
visit new_user_session_path #did
我正在尝试将rails 4.2应用程序升级到5.2.3。
我的系统是MacOS 10.14.6 Mojave。Bundler版本2.0.2
这是我做bundle update后的错误
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
rails (~> 5.2.3) was resolved to 5.2.4.rc1, which depends on
actionpack (= 5.2.4.rc1)
simple_form was r
我运行bundle update rails将我的应用程序更新为6.0,并得到了这个非常令人困惑的输出。更新宝石文件中的这些宝石不会产生任何影响。我不能对这个错误做出正面或反面的判断,这感觉就像一个陷阱22。这是输出:
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
activerecord-session_store (~> 1.1, >= 1.1.3) was resolved to 1.1.3, which depends on
actionpack
我有一个rails应用程序,它使用了sidekiq、sidekiq-status和sidekiq批处理:
gem "sidekiq"
gem "sidekiq-status"
# freemium version vs sidekiq pro https://github.com/breamware/sidekiq-batch
gem "sidekiq-batch"
# slim & sinatra for sidekiq monitoring
gem "sinatra", "2.0.0.beta2", r
如何在Sidekiq仪表板保持开放状态时减少/sidekiq/stats命令调用的频率。是否有一种方法可以设置/stats命令的触发频率。 Started GET "/sidekiq/stats" for 127.0.0.1 at 2019-01-18 13:08:59 +0530
Started GET "/sidekiq/stats" for 127.0.0.1 at 2019-01-18 13:09:04 +0530
Started GET "/sidekiq/stats" for 127.0.0.1 at 2019-01-18 13:0
我有一个Rails 6.0.3.5API,我不使用Devise进行身份验证。当我试图访问sidekiq UI时,它会大喊:
Sidekiq::Web needs a valid Rack session for CSRF protection. If this is a Rails app, make sure you mount Sidekiq::Web *inside* your application routes: Rails.application.routes.draw do mount Sidekiq::Web => "/sidekiq" .... end
Sidekiq未能从config/ file kiq.yml中的默认配置文件开始。
---
:pidfile: tmp/pids/sidekiq.pid
:logfile: log/sidekiq.log
在rails应用程序根中运行bundle exec sidekiq -d时,它报告错误:
You really should set a logfile if you're going to daemonize.
/home/canoe/.rvm/gems/ruby-2.0.0-p353@rails4/gems/sidekiq-2.17.2/lib/sidekiq/cli.rb:14
我正在尝试启动sidekiq服务,但是当我运行
bundle exec sidekiq
我得到了以下信息
/var/lib/gems/1.9.1/gems/sidekiq-3.2.6/lib/sidekiq.rb:3:in `<top (required)>': Sidekiq 3.2.6 does not support Ruby 1.9. (RuntimeError)
from /var/lib/gems/1.9.1/gems/sidekiq-3.2.6/lib/sidekiq/cli.rb:9:in `require'
from /var/lib/ge
我看了整个互联网,但做不到。需要在VDS (Ubuntu14.04)启动时启动Sidekiq。我发现并使用了这个:
# /etc/init/sidekiq.conf - Sidekiq config
# This example config should work with Ubuntu 12.04+. It
# allows you to manage multiple Sidekiq instances with
# Upstart, Ubuntu's native service management tool.
#
# See workers.conf for how t
现在是将我的RoR 5.2.4应用程序部署到验证环境的时候了。受和其他读物的启发,我尝试在SLES15上设置Sidekiq作为服务。以下是服务文件:
#
# This file tells systemd how to run Sidekiq as a 24/7 long-running daemon.
#
# Unit file is created into /etc/systemd/system/ for execution on SLES15@BFS
# The Unit file drives only one instance of the process. To run mult
我正试图使用两个新启动脚本(如示例所示)来守护sidekiq。基本上,工人服务启动了固定数量的侧翼服务。
问题是,在我要启动的代码行中,sidekiq脚本失败了。我尝试在bash中直接运行这个命令,它运行得很好。
我试过所有不同的注释行,但都没有用。
所以我的问题是我做错了什么?在哪里可以看到错误消息?
这是我修改过的sidekiq脚本:
# /etc/init/sidekiq.conf - Sidekiq config
# This example config should work with Ubuntu 12.04+. It
# allows you to manage multi
我有一个类似这样的systemd服务脚本:
#
# systemd unit file for Debian
#
# Put this in /lib/systemd/system
# Run:
# - systemctl enable sidekiq
# - systemctl {start,stop,restart} sidekiq
#
# This file corresponds to a single Sidekiq process. Add multiple copies
# to run multiple processes (sidekiq-1, sidekiq-2,
在Centos上安装Sidekiq之后,我尝试使用以下命令启动Sidekiq (Sidekiq使用它):
bundle exec sidekiq
但我得到的是:
tupromail@be-s2534-msl:~/cuttlefish-master$ bundle exec sidekiq
Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by run
我刚刚在我最新的docker容器上运行了一个docker-compose build,我注意到sidekiq现在正在重复地生成以下代码行: sidekiq_1 | `Redis#exists(key)` will return an Integer in redis-rb 4.3. `exists?` returns a boolean, you should use it instead. To opt-in to the new behavior now you can set Redis.exists_returns_integer = true. To disable this
我是rails的新手。我正在精确地执行(复制粘贴)
最重要的是,我正在运行
redis -server
和
bundle exec sidekiq
但是我收到消息"Video is still being encoded.",我检查了数据库,我的视频正在被插入。这是Redis和sidekiq的日志
Redis-- $ redis-server
[64544] 11 Oct 07:36:14.426 # Warning: no config file specified, using the default config. In order to specify a conf
我在ubuntu 16.04中使用systemd service和Capistrano部署sidekiq。
Sidekiq系统服务文件/lib/systemd/ system /idekiq.service
#
# systemd unit file for CentOS 7, Ubuntu 15.04
#
# Customize this file based on your bundler location, app directory, etc.
# Put this in /usr/lib/systemd/system (CentOS) or /lib/systemd/system (
在我们的暂存应用程序上启动服务器后,我需要Sidekiq运行。我们转移到了Rackspace上的另一个服务器实例,以便更好地反映我们的生产条件。
启动应用程序时,
passenger start --nginx-config-template nginx.conf.erb --address 127.0.0.1 -p 3002 --daemonize
sidekiq文件如下:
# /etc/init/sidekiq.conf - Sidekiq config
# This example config should work with Ubuntu 12.04+. It
# allows yo