fractaledmind / enlitenment

A Rails application template script to lead your app to SQLite enlightenment.
44 stars 3 forks source link

Be (Way) More Invasive? #8

Closed trinitytakei closed 2 months ago

trinitytakei commented 2 months ago

I continued with the enlitement of my JSP-based app after #5 was fixed.

I ran into the next issue right away: the 'sqlite3' gem was not added to the Gemfile. Nor was the 'pg' gem removed.

If the script should enlite apps that previously used another database gem (like pg in my case), then I'd consider this a bug and suggest that

1) the old db gem should be removed from Gemfile 2) sqlite3 should be added to Gemfile 3) (?) I just realized that for this to be fully automatic, the existing data should be imported from the original whatever-DB to the newly created SQLite DB... and that might be outside of the scope of this script?

It's not white/black imo - even if we consider 3) to be indeed out of scope, the script could still run 1) and 2), then display a message to the user to do this themselves ¯\_(ツ)_/¯

fractaledmind commented 2 months ago

Ensuring that the sqlite3 gem is in the Gemfile should be a part of the scope, but removing any gems or migrating data is certainly out of scope for this script. I appreciated you wanting to test it in the context of a PG-backed JSP app, but this script is not trying to be a script to migrate a Rails app from PG to SQLite. That is a completely different can of worms. This script aims simply to take a "stock" SQLite-backed Rails apps and make it production-ready.

fractaledmind commented 2 months ago

Note: at some point it would be nice to explore the problem space of migrating a Rails app from PG to SQLite, and if you want to explore that, I'm down to help. But I can't expand scope on this project at this time.

trinitytakei commented 2 months ago

Makes sense. I was not sure, b/c when I initially asked whether JSP apps count, you said "Sounds like a good test bed. "

But I agree (especially after trying, and running into these issues (which made me realize just how many more issues there must be down the road)) that this should be outside of the scope of the current script.

Whether I really want go all the way and enlite this JSP-based app... it would be certainly nice, but I think the amount of work it would require might not be worth it (vs just starting a new Rails 8 app from scratch, apply enlitement, and move things over manually).

So let's just "change" this ticket (maybe closing as invalid and opening a new one?) from Be (Way) More Invasive? to Ensure the sqlite3 gem is in the Gemfile.

fractaledmind commented 2 months ago

Resolved with 97b7c16