oldmoe / litestack

MIT License
1.14k stars 64 forks source link

Litestack breaks rails database tasks in Rails ~> 7.2 #128

Open alexspark opened 2 months ago

alexspark commented 2 months ago

I've tested these set of commands on rails 7.2.1, 7.2.0, and 7.1.3.4 and it only works on 7.1.3.4

  1. rails new litestack-app && cd litestack-app
  2. bundle add litestack
  3. bin/rails g litestack:install
  4. bin/rails db:create

The error I get is on ~> 7.2 versions is as follows:

bin/rails aborted!
NoMethodError: undefined method `sqlite3_production_warning=' for class ActiveRecord::Base (NoMethodError)

Tasks: TOP => db:create => db:load_config
(See full trace by running task with --trace)

I tried to look at the rails 7.2 Changelogs but couldn't find any changes related to that configuration (EDIT: nvm found some changes. see comment below)

alexspark commented 2 months ago

Rails 7.1.3.4 assigns sqlite3_production_warning to true here, but 7.2 no longer assigns it in that same section of code.

but it's strange that litestack's railtie can even reach the assignment b/c of the key? guard here

adrienpoly commented 2 months ago

This has been fix on main https://github.com/oldmoe/litestack/pull/106 The current solution is to get the gem from the main branch

Schwad commented 1 month ago

This has been fix on main https://github.com/oldmoe/litestack/pull/106

Thanks for the tip!

oldmoe commented 1 month ago

I have been away from Litestack for the past few weeks (vacation + family), will hopefully get around to releasing a new gem in the coming week or two

On Sat, 14 Sept 2024 at 10:43, Nick Schwaderer @.***> wrote:

This has been fix on main #106 https://github.com/oldmoe/litestack/pull/106

Thanks for the tip!

— Reply to this email directly, view it on GitHub https://github.com/oldmoe/litestack/issues/128#issuecomment-2350915981, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEQZXRDYRW57KNSNXDMBLZWPZL7AVCNFSM6AAAAABNRJHYKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJQHEYTKOJYGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>