Error deploying solid cache - ArgumentError

1) If you get the following error when deploying Solid Cache.

ArgumentError: You can only specify one of :database, :databases, or :connects_to (ArgumentError)

2) The reason is likely you added connects_to in your configuration file. It conflicts with the database config created by default.

# config/cache.yml

production:
  database: cache
  <<: *default

# config/environments/production.rb

config.solid_cache.connects_to = { database: { writing: :cache } }

3) To fix the error, keep only one of the above.

4) It is slightly confusing at the moment. Solid Queue creates connects_to as default, but Solid Cache creates database as default.


AI Summary
gpt-4o-2024-08-06 2024-12-15 11:39:31
The post addresses an error encountered during Solid Cache deployment, caused by conflicting configurations for database connections in the setup file. The solution is to retain only one configuration type. The confusion arises because Solid Queue and Solid Cache set different default configurations.
Chrome On-device AI 2025-01-20 10:25:52

Share Article