Closed prashcr closed 11 months ago
Jets v5 lazy initializes ActiveRecord thanks to Jets Engines support now. So don't believe will need the monkeypatch workaround anymore. Closing out.
https://blog.boltops.com/2023/12/05/jets-5-improvements-galore/
Checklist
jets upgrade
command that makes this a simple task. There's also an Upgrading Guide: http://rubyonjets.com/docs/upgrading/My Environment
Expected Behaviour
I can create a table with Dynamoid using
rake dynamoid:create_tables
and Jets doesn't interfere with the rake task.Current Behavior
Jets
tasks,Jets::Commands::Db::Tasks.load!
loads ActiveRecord db tasks which sets a dummyRails.application
Rails couldn't infer whether you are using multiple databases from your database.yml and can't generate the tasks for the non-primary databases. If you'd like to use this feature, please simplify your ERB.
Jets::Commands::Db::Tasks::Dummy
and trying to create a table name with that valueStep-by-step reproduction instructions
rake dynamoid:create_tables
to create DynamoDB tablesCode Sample
Solution Suggestion
disable_active_record
(or something more elegant), should conditionally callJets::Commands::Db::Tasks.load!
inJets::Commands::RakeTasks
, like we do for loading webpack tasksload File.expand_path("../environment-task.rake", __FILE__)
fromJets::Commands::Db::Tasks.load
and put it inJets::Commands::RakeTasks
insteadMy monkeypatch fix, for reference