我正在尝试使用 Systemd 在生产环境中运行 Sidekiq。尝试启动 sidekiq 时收到以下错误。
/bin/bash -lc "bundle exec sidekiq -e production -C config/sidekiq.yml -L log/sidekiq.log"
ERROR: Logfile redirection was removed in Sidekiq 6.0, Sidekiq will only log to STDOUT
uninitialized constant Rails
(erb):2:in `<main>'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/2.5.0/erb.rb:885:in `eval'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/2.5.0/erb.rb:885:in `result'
/home/jeff/apps/ih_crm/production/shared/bundle/ruby/2.5.0/gems/sidekiq-6.0.7/lib/sidekiq/cli.rb:362:in `parse_config'
/home/jeff/apps/ih_crm/production/shared/bundle/ruby/2.5.0/gems/sidekiq-6.0.7/lib/sidekiq/cli.rb:228:in `setup_options'
/home/jeff/apps/ih_crm/production/shared/bundle/ruby/2.5.0/gems/sidekiq-6.0.7/lib/sidekiq/cli.rb:24:in `parse'
/home/jeff/apps/ih_crm/production/shared/bundle/ruby/2.5.0/gems/sidekiq-6.0.7/bin/sidekiq:27:in `<top (required)>'
/home/jeff/apps/ih_crm/production/shared/bundle/ruby/2.5.0/bin/sidekiq:23:in `load'
/home/jeff/apps/ih_crm/production/shared/bundle/ruby/2.5.0/bin/sidekiq:23:in `<top (required)>'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler/cli/exec.rb:63:in `load'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler/cli/exec.rb:63:in `kernel_load'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler/cli/exec.rb:28:in `run'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:476:in `exec'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:30:in `dispatch'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler/cli.rb:24:in `start'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/site_ruby/2.5.0/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/home/jeff/.rbenv/versions/2.5.0/lib/ruby/gems/2.5.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/home/jeff/.rbenv/versions/2.5.0/bin/bundle:23:in `load'
/home/jeff/.rbenv/versions/2.5.0/bin/bundle:23:in `<main>'
以下是输出bundle install
jeff@ih_crm:~/apps/ih_crm/production/current$ bundle install
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Using rake 13.0.1
Using concurrent-ruby 1.1.6
Using i18n 1.8.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.7
Using activesupport 5.2.4.3
Using builder 3.2.4
Using erubi 1.9.0
Using mini_portile2 2.4.0
Using nokogiri 1.10.10
Using rails-dom-testing 2.0.3
Using crass 1.0.6
Using loofah 2.6.0
Using rails-html-sanitizer 1.3.0
Using actionview 5.2.4.3
Using rack 2.2.3
Using rack-test 1.1.0
Using actionpack 5.2.4.3
Using nio4r 2.5.2
Using websocket-extensions 0.1.5
Using websocket-driver 0.7.3
Using actioncable 5.2.4.3
Using globalid 0.4.2
Using activejob 5.2.4.3
Using mini_mime 1.0.2
Using mail 2.7.1
Using actionmailer 5.2.4.3
Using activemodel 5.2.4.3
Using case_transform 0.2
Using jsonapi-renderer 0.2.2
Using active_model_serializers 0.10.10
Using arel 9.0.0
Using activerecord 5.2.4.3
Using mimemagic 0.3.5
Using marcel 0.3.3
Using activestorage 5.2.4.3
Using public_suffix 4.0.5
Using addressable 2.7.0
Using execjs 2.7.0
Using autoprefixer-rails 9.8.5
Using aws-eventstream 1.1.0
Using aws-partitions 1.345.0
Using aws-sigv4 1.2.1
Using jmespath 1.4.0
Using aws-sdk-core 3.104.3
Using aws-sdk-accessanalyzer 1.9.0
Using aws-sdk-acm 1.34.0
Using aws-sdk-acmpca 1.26.0
Using aws-sdk-alexaforbusiness 1.40.0
Using aws-sdk-amplify 1.21.0
Using aws-sdk-apigateway 1.48.0
Using aws-sdk-apigatewaymanagementapi 1.16.0
Using aws-sdk-apigatewayv2 1.23.0
Using aws-sdk-appconfig 1.9.0
Using aws-sdk-applicationautoscaling 1.44.0
Using aws-sdk-applicationdiscoveryservice 1.30.0
Using aws-sdk-applicationinsights 1.12.0
Using aws-sdk-appmesh 1.28.0
Using aws-sdk-appstream 1.44.0
Using aws-sdk-appsync 1.30.0
Using aws-sdk-athena 1.30.0
Using aws-sdk-augmentedairuntime 1.7.0
Using aws-sdk-autoscaling 1.43.0
Using aws-sdk-autoscalingplans 1.25.0
Using aws-sdk-backup 1.18.0
Using aws-sdk-batch 1.34.0
Using aws-sdk-budgets 1.32.0
Using aws-sdk-chime 1.32.0
Using aws-sdk-cloud9 1.25.0
Using aws-sdk-clouddirectory 1.26.0
Using aws-sdk-cloudformation 1.41.0
Using aws-sdk-cloudfront 1.35.0
Using aws-sdk-cloudhsm 1.24.0
Using aws-sdk-cloudhsmv2 1.27.0
Using aws-sdk-cloudsearch 1.23.0
Using aws-sdk-cloudsearchdomain 1.19.0
Using aws-sdk-cloudtrail 1.26.0
Using aws-sdk-cloudwatch 1.42.0
Using aws-sdk-cloudwatchevents 1.33.0
Using aws-sdk-cloudwatchlogs 1.34.0
Using aws-sdk-codeartifact 1.1.0
Using aws-sdk-codebuild 1.57.0
Using aws-sdk-codecommit 1.37.0
Using aws-sdk-codedeploy 1.34.0
Using aws-sdk-codeguruprofiler 1.9.0
Using aws-sdk-codegurureviewer 1.9.0
Using aws-sdk-codepipeline 1.34.0
Using aws-sdk-codestar 1.24.0
Using aws-sdk-codestarconnections 1.7.0
Using aws-sdk-codestarnotifications 1.5.0
Using aws-sdk-cognitoidentity 1.24.0
Using aws-sdk-cognitoidentityprovider 1.42.0
Using aws-sdk-cognitosync 1.21.0
Using aws-sdk-comprehend 1.35.0
Using aws-sdk-comprehendmedical 1.20.0
Using aws-sdk-computeoptimizer 1.5.0
Using aws-sdk-configservice 1.49.0
Using aws-sdk-connect 1.29.0
Using aws-sdk-connectparticipant 1.5.0
Using aws-sdk-costandusagereportservice 1.24.0
Using aws-sdk-costexplorer 1.45.0
Using aws-sdk-databasemigrationservice 1.39.0
Using aws-sdk-dataexchange 1.7.0
Using aws-sdk-datapipeline 1.21.0
Using aws-sdk-datasync 1.23.0
Using aws-sdk-dax 1.24.0
Using aws-sdk-detective 1.8.0
Using aws-sdk-devicefarm 1.36.0
Using aws-sdk-directconnect 1.34.0
Using aws-sdk-directoryservice 1.31.0
Using aws-sdk-dlm 1.31.0
Using aws-sdk-docdb 1.20.0
Using aws-sdk-dynamodb 1.51.0
Using aws-sdk-dynamodbstreams 1.21.0
Using aws-sdk-ebs 1.7.0
Using aws-sdk-ec2 1.179.0
Using aws-sdk-ec2instanceconnect 1.8.0
Using aws-sdk-ecr 1.34.0
Using aws-sdk-ecs 1.67.0
Using aws-sdk-efs 1.33.0
Using aws-sdk-eks 1.39.0
Using aws-sdk-elasticache 1.40.0
Using aws-sdk-elasticbeanstalk 1.35.0
Using aws-sdk-elasticinference 1.7.0
Using aws-sdk-elasticloadbalancing 1.25.0
Using aws-sdk-elasticloadbalancingv2 1.47.0
Using aws-sdk-elasticsearchservice 1.39.0
Using aws-sdk-elastictranscoder 1.24.0
Using aws-sdk-emr 1.34.0
Using aws-sdk-eventbridge 1.11.0
Using aws-sdk-firehose 1.31.0
Using aws-sdk-fms 1.29.0
Using aws-sdk-forecastqueryservice 1.7.0
Using aws-sdk-forecastservice 1.8.0
Using aws-sdk-frauddetector 1.9.0
Using aws-sdk-fsx 1.25.0
Using aws-sdk-gamelift 1.34.0
Using aws-sdk-glacier 1.32.0
Using aws-sdk-globalaccelerator 1.20.0
Using aws-sdk-glue 1.65.0
Using aws-sdk-greengrass 1.33.0
Using aws-sdk-groundstation 1.11.0
Using aws-sdk-guardduty 1.36.0
Using aws-sdk-health 1.27.0
Using aws-sdk-honeycode 1.0.0
Using aws-sdk-iam 1.43.0
Using aws-sdk-imagebuilder 1.11.0
Using aws-sigv2 1.0.1
Using aws-sdk-importexport 1.21.0
Using aws-sdk-inspector 1.29.0
Using aws-sdk-iot 1.54.0
Using aws-sdk-iot1clickdevicesservice 1.23.0
Using aws-sdk-iot1clickprojects 1.23.0
Using aws-sdk-iotanalytics 1.31.0
Using aws-sdk-iotdataplane 1.23.0
Using aws-sdk-iotevents 1.17.0
Using aws-sdk-ioteventsdata 1.10.0
Using aws-sdk-iotjobsdataplane 1.22.0
Using aws-sdk-iotsecuretunneling 1.5.0
Using aws-sdk-iotsitewise 1.7.0
Using aws-sdk-iotthingsgraph 1.9.0
Using aws-sdk-ivs 1.0.0
Using aws-sdk-kafka 1.23.0
Using aws-sdk-kendra 1.9.0
Using aws-sdk-kinesis 1.26.0
Using aws-sdk-kinesisanalytics 1.26.0
Using aws-sdk-kinesisanalyticsv2 1.18.0
Using aws-sdk-kinesisvideo 1.27.0
Using aws-sdk-kinesisvideoarchivedmedia 1.26.0
Using aws-sdk-kinesisvideomedia 1.23.0
Using aws-sdk-kinesisvideosignalingchannels 1.5.0
Using aws-sdk-kms 1.36.0
Using aws-sdk-lakeformation 1.7.0
Using aws-sdk-lambda 1.46.0
Using aws-sdk-lambdapreview 1.21.0
Using aws-sdk-lex 1.28.0
Using aws-sdk-lexmodelbuildingservice 1.33.0
Using aws-sdk-licensemanager 1.16.0
Using aws-sdk-lightsail 1.36.0
Using aws-sdk-machinelearning 1.22.0
Using aws-sdk-macie 1.22.0
Using aws-sdk-macie2 1.7.0
Using aws-sdk-managedblockchain 1.13.0
Using aws-sdk-marketplacecatalog 1.5.0
Using aws-sdk-marketplacecommerceanalytics 1.26.0
Using aws-sdk-marketplaceentitlementservice 1.21.0
Using aws-sdk-marketplacemetering 1.28.0
Using aws-sdk-mediaconnect 1.25.0
Using aws-sdk-mediaconvert 1.53.0
Using aws-sdk-medialive 1.50.0
Using aws-sdk-mediapackage 1.31.0
Using aws-sdk-mediapackagevod 1.16.0
Using aws-sdk-mediastore 1.27.0
Using aws-sdk-mediastoredata 1.24.0
Using aws-sdk-mediatailor 1.29.0
Using aws-sdk-migrationhub 1.26.0
Using aws-sdk-migrationhubconfig 1.6.0
Using aws-sdk-mobile 1.21.0
Using aws-sdk-mq 1.30.0
Using aws-sdk-mturk 1.24.0
Using aws-sdk-neptune 1.27.0
Using aws-sdk-networkmanager 1.5.0
Using aws-sdk-opsworks 1.27.0
Using aws-sdk-opsworkscm 1.37.0
Using aws-sdk-organizations 1.45.0
Using aws-sdk-outposts 1.7.0
Using aws-sdk-personalize 1.15.0
Using aws-sdk-personalizeevents 1.9.0
Using aws-sdk-personalizeruntime 1.13.0
Using aws-sdk-pi 1.21.0
Using aws-sdk-pinpoint 1.43.0
Using aws-sdk-pinpointemail 1.21.0
Using aws-sdk-pinpointsmsvoice 1.18.0
Using aws-sdk-polly 1.34.0
Using aws-sdk-pricing 1.21.0
Using aws-sdk-qldb 1.8.0
Using aws-sdk-qldbsession 1.6.0
Using aws-sdk-quicksight 1.26.0
Using aws-sdk-ram 1.19.0
Using aws-sdk-rds 1.94.0
Using aws-sdk-rdsdataservice 1.20.0
Using aws-sdk-redshift 1.46.0
Using aws-sdk-rekognition 1.42.0
Using aws-sdk-resourcegroups 1.26.0
Using aws-sdk-resourcegroupstaggingapi 1.28.0
Using aws-sdk-robomaker 1.26.0
Using aws-sdk-route53 1.40.0
Using aws-sdk-route53domains 1.25.0
Using aws-sdk-route53resolver 1.17.0
Using aws-sdk-s3 1.75.0
Using aws-sdk-s3control 1.21.0
Using aws-sdk-sagemaker 1.64.0
Using aws-sdk-sagemakerruntime 1.24.0
Using aws-sdk-savingsplans 1.7.0
Using aws-sdk-schemas 1.6.0
Using aws-sdk-secretsmanager 1.40.0
Using aws-sdk-securityhub 1.29.0
Using aws-sdk-serverlessapplicationrepository 1.29.0
Using aws-sdk-servicecatalog 1.43.0
Using aws-sdk-servicediscovery 1.26.0
Using aws-sdk-servicequotas 1.8.0
Using aws-sdk-ses 1.33.0
Using aws-sdk-sesv2 1.8.0
Using aws-sdk-shield 1.29.0
Using aws-sdk-signer 1.23.0
Using aws-sdk-simpledb 1.21.0
Using aws-sdk-sms 1.23.0
Using aws-sdk-snowball 1.31.0
Using aws-sdk-sns 1.28.0
Using aws-sdk-sqs 1.30.0
Using aws-sdk-ssm 1.85.0
Using aws-sdk-sso 1.6.0
Using aws-sdk-ssooidc 1.5.0
Using aws-sdk-states 1.31.0
Using aws-sdk-storagegateway 1.45.0
Using aws-sdk-support 1.25.0
Using aws-sdk-swf 1.22.0
Using aws-sdk-synthetics 1.5.0
Using aws-sdk-textract 1.17.0
Using aws-sdk-transcribeservice 1.45.0
Using aws-sdk-transcribestreamingservice 1.17.0
Using aws-sdk-transfer 1.23.0
Using aws-sdk-translate 1.24.0
Using aws-sdk-waf 1.33.0
Using aws-sdk-wafregional 1.34.0
Using aws-sdk-wafv2 1.9.0
Using aws-sdk-workdocs 1.25.0
Using aws-sdk-worklink 1.18.0
Using aws-sdk-workmail 1.27.0
Using aws-sdk-workmailmessageflow 1.6.0
Using aws-sdk-workspaces 1.41.0
Using aws-sdk-xray 1.28.0
Using aws-sdk-resources 3.76.0
Using aws-sdk 3.0.1
Using bcrypt 3.1.12
Using msgpack 1.3.3
Using bootsnap 1.4.7
Using popper_js 1.16.0
Using rb-fsevent 0.10.4
Using ffi 1.13.1
Using rb-inotify 0.10.1
Using sass-listen 4.0.0
Using sass 3.7.4
Using bootstrap 4.1.3
Using will_paginate 3.1.7
Using bootstrap-will_paginate 1.0.0
Using bundler 2.1.4
Using mini_magick 4.10.1
Using ruby-vips 2.0.17
Using image_processing 1.11.0
Using carrierwave 2.1.0
Using htmlentities 4.3.4
Using rubyzip 2.3.0
Using caxlsx 3.0.2
Using caxlsx_rails 0.6.2
Using climate_control 0.2.0
Using terrapin 0.6.0
Using cocaine 0.6.0
Using orm_adapter 0.5.0
Using ckeditor 4.2.4
Using cliver 0.3.2
Using coffee-script-source 1.12.2
Using coffee-script 2.4.1
Using method_source 1.0.0
Using thor 1.0.1
Using railties 5.2.4.3
Using coffee-rails 4.2.2
Using ruby-rc4 0.1.5
Using combine_pdf 1.0.18
Using connection_pool 2.2.3
Using declarative 0.0.20
Using declarative-option 0.1.0
Using unf_ext 0.0.7.7
Using unf 0.1.4
Using domain_name 0.5.20190701
Using ejs 1.1.1
Using et-orbi 1.2.4
Using excon 0.76.0
Using faker 2.13.0
Using multipart-post 2.1.1
Using faraday 1.0.1
Using formatador 0.2.5
Using mime-types-data 3.2020.0512
Using mime-types 3.3.1
Using fog-core 2.2.0
Using multi_json 1.15.0
Using fog-json 1.2.0
Using fog-xml 0.1.3
Using ipaddress 0.8.3
Using fog-aws 3.6.6
Using raabro 1.3.1
Using fugit 1.3.6
Using jwt 2.2.1
Using memoist 0.16.2
Using os 1.1.0
Using signet 0.14.0
Using googleauth 0.13.0
Using httpclient 2.8.3
Using uber 0.1.0
Using representable 3.0.4
Using retriable 3.1.2
Using google-api-client 0.42.2
Using http-accept 1.7.0
Using http-cookie 1.0.3
Using netrc 0.11.0
Using rest-client 2.1.0
Using xmlrpc 0.3.0
Using infusionsoft 1.3.4b
Using jbuilder 2.10.0
Using jquery-rails 4.3.1
Using json 2.3.1
Using koala 3.0.0
Using material_icons 2.2.1
Using money 6.13.8
Using monetize 1.9.4
Using ruby2_keywords 0.0.2
Using mustermann 1.1.1
Using newrelic_rpm 6.12.0.367
Using safe_shell 1.1.0
Using pdf-forms 1.2.0
Using pg 1.2.3
Using pg_search 2.3.2
Using public_activity 1.6.4
Using puma 3.12.6
Using rack-cors 1.1.1
Using rack-protection 2.0.8.1
Using sprockets 3.7.2
Using sprockets-rails 3.2.1
Using rails 5.2.4.3
Using ransack 2.3.2 from https://github.com/activerecord-hackery/ransack.git (at master@c9cc20d)
Using redis 4.2.5
Using sidekiq 6.0.7
Using sidekiq-cron 1.2.0
Using tilt 2.0.10
Using sinatra 2.0.8.1
Using stripe 5.22.0
Using stripe_event 2.3.1
Using uglifier 4.2.0
Bundle complete! 62 Gemfile dependencies, 379 gems now installed.
Gems in the groups development and test were not installed.
jeff gems are installed into `/home/jeff/apps/ih_crm/production/shared/bundle`
jeff@insurancehero:~/apps/ih_crm/production/current$
我已经安装了 rails,并且已经在这个服务器上运行了一段时间。我使用的是 Ruby 2.5.0 和 Rails 5.2.0。有人见过这种情况并知道该如何修复吗?