【问题标题】:No connection pool with 'primary' found没有找到“主要”的连接池
【发布时间】:2020-08-14 07:50:23
【问题描述】:

我正在使用 rails 5.2.3 和 ruby​​ 2.5.2 版本,在我的工作中,我有两个活动的作业类,它们将并行执行两个作业,我正在使用 MSSQL 数据库并且“没有找到'primary'的连接池”当它开始并行工作时出现问题。

谁能帮我解决这个问题。

【问题讨论】:

  • 请发布您的Gemfile的内容
  • 我在下面添加了 Gemfile,我正在使用活动作业来并行工作。

标签: ruby-on-rails sql-server rails-activejob


【解决方案1】:
#source 'https://rubygems.org'
source 'http://production.cf.rubygems.org'
#source 'http://rubygems.org'

gem 'rails', '5.2.3'
gem 'log4r'
gem 'will_paginate'
gem 'bcrypt'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'activesupport'
gem 'activerecord-sqlserver-adapter'
gem 'tiny_tds'
gem 'sequel'
gem 'mysql2', '~> 0.5.2 '
gem 'bootsnap'
gem 'capybara'
gem 'poltergeist', :group => [:development, :test]
gem "rspec-rails", :group => [:development, :test]
gem 'public_suffix'
gem 'xpath'
gem 'nokogiri'
gem 'byebug', '~> 11.1', '>= 11.1.1'
gem 'activewarehouse-etl', '~> 1.0'
gem 'table_print'
gem 'sidekiq'
#gem 'pg'
gem 'adapter_extensions', '~> 0.9.5.rc1'
gem 'test-unit'
gem "iconv", "~> 1.0.3"
gem 'fileutils'
gem 'json'
# Gems used only for assets and not required
# in production environments by default.
gem 'stupidedi'
gem 'sass-rails'
gem 'sass'
gem 'coffee-rails'
gem 'mailfactory'
gem 'rake'
gem 'rack-cache'
gem 'listen'
gem 'thor'
gem 'openssl'
gem 'rb-inotify'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyrhino'

gem 'uglifier'
group :assets do

end
gem 'rubyzip', '>= 1.0.0' 

gem 'axlsx'
gem "axlsx_rails"
gem 'prawn'
gem 'typhoeus'
gem 'tlsmail'
gem 'net_http_ssl_fix'
gem 'simple_xlsx_reader'
gem 'spreadsheet'

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

# Use unicorn as the app server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-04-11
    • 2019-06-07
    • 2019-07-08
    • 2014-01-17
    • 1970-01-01
    • 2021-01-01
    • 1970-01-01
    相关资源
    最近更新 更多