You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been working on spinning up a new rails server and for some some reason when I go to update the gem rbis with bin/tapioca gems I get an error when solid cable is being used for development.
/Users/USERNAME/.gem/ruby/3.3.6/gems/activerecord-8.0.0/lib/active_record/database_configurations.rb:229:in `resolve_symbol_connection': The `cable` database is not configured for the `development` environment. (ActiveRecord::AdapterNotSpecified)
Available database configurations are:
from /Users/USERNAME/.gem/ruby/3.3.6/gems/activerecord-8.0.0/lib/active_record/database_configurations.rb:179:in `resolve'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/activerecord-8.0.0/lib/active_record/connection_handling.rb:391:in `resolve_config_for_connection'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/activerecord-8.0.0/lib/active_record/connection_handling.rb:100:in `block (2 levels) in connects_to'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/activerecord-8.0.0/lib/active_record/connection_handling.rb:99:in `each'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/activerecord-8.0.0/lib/active_record/connection_handling.rb:99:in `block in connects_to'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/activerecord-8.0.0/lib/active_record/connection_handling.rb:98:in `each'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/activerecord-8.0.0/lib/active_record/connection_handling.rb:98:in `connects_to'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/solid_cable-3.0.2/app/models/solid_cable/record.rb:7:in `<class:Record>'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/solid_cable-3.0.2/app/models/solid_cable/record.rb:4:in `<module:SolidCable>'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/solid_cable-3.0.2/app/models/solid_cable/record.rb:3:in `<main>'
from /Users/USERNAME/.rubies/ruby-3.3.6/lib/ruby/3.3.0/bundled_gems.rb:69:in `require'
from /Users/USERNAME/.rubies/ruby-3.3.6/lib/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/zeitwerk-2.7.1/lib/zeitwerk/core_ext/kernel.rb:26:in `require'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/solid_cable-3.0.2/app/models/solid_cable/message.rb:4:in `<module:SolidCable>'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/solid_cable-3.0.2/app/models/solid_cable/message.rb:3:in `<main>'
from /Users/USERNAME/.rubies/ruby-3.3.6/lib/ruby/3.3.0/bundled_gems.rb:69:in `require'
from /Users/USERNAME/.rubies/ruby-3.3.6/lib/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/zeitwerk-2.7.1/lib/zeitwerk/core_ext/kernel.rb:26:in `require'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/runtime/reflection.rb:50:in `const_get'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/runtime/reflection.rb:50:in `constantize'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/runtime/trackers/autoload.rb:25:in `block in eager_load_all!'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/runtime/trackers/autoload.rb:50:in `with_disabled_exits'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `bind_call'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `block in _on_method_added'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/runtime/trackers/autoload.rb:20:in `eager_load_all!'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `bind_call'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `block in _on_method_added'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/loaders/gem.rb:69:in `require_gem_file'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `bind_call'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `block in _on_method_added'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/loaders/gem.rb:35:in `load'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `bind_call'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `block in _on_method_added'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/loaders/gem.rb:29:in `load_application'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `bind_call'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `block in _on_method_added'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/commands/abstract_gem.rb:189:in `block in perform_additions'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/thor-1.3.2/lib/thor/shell/basic.rb:46:in `indent'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/commands/abstract_gem.rb:185:in `perform_additions'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `bind_call'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `block in _on_method_added'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/commands/gem_sync.rb:13:in `execute'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `bind_call'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `block in _on_method_added'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/commands/command.rb:27:in `block in run'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca.rb:24:in `block in silence_warnings'
from /Users/USERNAME/.rubies/ruby-3.3.6/lib/ruby/3.3.0/rubygems/user_interaction.rb:46:in `use_ui'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca.rb:23:in `silence_warnings'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `bind_call'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `block in _on_method_added'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/commands/command.rb:26:in `run'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `bind_call'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/sorbet-runtime-0.5.11635/lib/types/private/methods/_methods.rb:279:in `block in _on_method_added'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/lib/tapioca/cli.rb:314:in `gem'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/thor-1.3.2/lib/thor/command.rb:28:in `run'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/thor-1.3.2/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/thor-1.3.2/lib/thor.rb:538:in `dispatch'
from /Users/USERNAME/.gem/ruby/3.3.6/gems/thor-1.3.2/lib/thor/base.rb:584:in `start'
from /Users/USERNAME/.gem/ruby/3.3.6/bundler/gems/tapioca-cc19ba0b523d/exe/tapioca:25:in `<top (required)>'
from bin/tapioca:27:in `load'
from bin/tapioca:27:in `<main>'
My database.yml is the default:
default: &defaultadapter: sqlite3pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>timeout: 5000development:
primary:
<<: *defaultdatabase: storage/development.sqlite3cache:
<<: *defaultdatabase: storage/development_cache.sqlite3migrations_paths: db/cache_migratequeue:
<<: *defaultdatabase: storage/development_queue.sqlite3migrations_paths: db/queue_migratecable:
<<: *defaultdatabase: storage/development_cable.sqlite3migrations_paths: db/cable_migrate# Warning: The database defined as "test" will be erased and# re-generated from your development database when you run "rake".# Do not set this db to the same as development or production.test:
<<: *defaultdatabase: storage/test.sqlite3# Store production database in the storage/ directory, which by default# is mounted as a persistent Docker volume in config/deploy.yml.production:
primary:
<<: *defaultdatabase: storage/production.sqlite3cache:
<<: *defaultdatabase: storage/production_cache.sqlite3migrations_paths: db/cache_migratequeue:
<<: *defaultdatabase: storage/production_queue.sqlite3migrations_paths: db/queue_migratecable:
<<: *defaultdatabase: storage/production_cable.sqlite3migrations_paths: db/cable_migrate
And I updated the default cable.yml which used to work when it was:
Are you able to load DB backed constants in your rails console with the new setup?
Yup, running the server works fine, all my linters work fine, and interacting with models via the rails console all seems to work fine. It is just this process that currently fails.
Looks like the constant being loaded that fails is SolidCable::Record. I verified that I can interact with this specific constant in a rails console as well.
I've been working on spinning up a new rails server and for some some reason when I go to update the gem rbis with
bin/tapioca gems
I get an error when solid cable is being used for development.My
database.yml
is the default:And I updated the default
cable.yml
which used to work when it was:But changing it to this broke things:
Am I doing something weird here? Or is tapioca not properly handling the newer multi-database setup from rails 8?
The text was updated successfully, but these errors were encountered: