Using sidekiq to Update Mysql Tables

Asked 2 years ago, Updated 2 years ago, 84 views

I use sidekiq to make the process of sending emails asynchronously.The results are written to the table when sending an email.The database uses sqlite in the development environment and mysql in the production environment.It worked fine in the development environment, but in the production environment, if you don't install "sqlite3" when you run sidekiq, you get "Gem:: LoadError: Specified'sqlite3' for database adapter" and "sidekiq" when you process the queue.I think I'm probably trying to find the sqlite table, but how do I update the mysql table on sidekiq?The Rails version is 4.2.7.

ruby-on-rails sidekiq

2022-09-30 17:50

1 Answers

The problem was solved by starting sidekiq with the following command.

bundle exec sidekiq-C config/sidekiq.yml --environment=production


Previously,

bundle exec sidekiq-C config/sidekiq.yml RAILS_ENV=production

It started as shown in , but it seems that the format of the production environment was incorrect.


2022-09-30 17:50

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.