Skip to content

Commit

Permalink
Modernization (#3)
Browse files Browse the repository at this point in the history
* Ruby 2.7.2 → 3.2.2

3.2.2 isn't the latest. It's the one already on my laptop.

* All versions of material_design_icons were yanked

That gem can no longer be installed. Let's see how badly we need it. I suspect we have alternatives.

* Bump a few gems to get it to bundle w/o error

`bundle update mimemagic nokogiri nio4r msgpack pg sqlite3`

* Bump globalid

to fix:

```
globalid-0.4.2/lib/global_id/uri/gid.rb:176:in `<module:URI>': uninitialized class variable @@schemes in URI (NameError)
```

* Getting the dev server to boot ...

* bundle up webpacker (no help tho)

* Only load RuboCop when running it

* Rails 7 resolve a problem with webpacker & Psych

```
psych/visitors/to_ruby.rb:432:in `visit_Psych_Nodes_Alias': Alias parsing was not enabled. To enable it, pass `aliases: true` to `Psych::load` or `Psych::safe_load`. (Psych::AliasesNotEnabled)
```
rails/rails@179d0a1

* Fix devise compat w/ new Rails

```
devise-4.7.3/lib/devise.rb:321:in `ref': undefined method `reference' for ActiveSupport::Dependencies:Module (NoMethodError)
```

* Bump listen to resolve multi-version problem

```
can't activate listen (~> 3.5), already activated listen-3.4.1. Make sure all dependencies are added to Gemfile. (Gem::LoadError)
```

* webpacker 5 actually resolves the psych problem

* npm install with new node rewrote lock file

* Migrating updating the schema

* Let's specify the stack

* Baseline ENV for review apps

I also manually copied the RAILS_MASTER_KEY from production the review app settings in Heroku.

* Move webpack from devDependencies to dependencies

Heroku doesn't install devDependencies, apparently.

* maybe NODE_ENV matters

* explicit webpack dep

* 🚒

* nodejs buildpack first

* heroku complains about multiple lock files

```
 !     Multiple lockfiles found
       Multiple package managers (npm,Yarn) have created lockfiles for this application,
       but only one can be used to install dependencies. Installing dependencies using the wrong package manager can result in missing
       packages or subtle bugs in production.
       Only one of the following package manager lockfiles are supported at a time:
       - package-lock.json
       - yarn.lock
       - pnpm-lock.yaml
       Please delete the lockfile(s) that should not be in use.

       https://help.heroku.com/0KU2EM53
```

* remove previous hack

```
 !     No matching version found for Yarn: 1.2.22
       Heroku supports most versions of Yarn published on npm, however you have
       specified a version in package.json (1.2.22) that does not correspond
       to any published version of Yarn. You can see a list of all published
       versions of Yarn with the following command:
       $ yarn info yarn versions
       You should always specify a Yarn version that matches the version
       you’re developing and testing with. To find your version locally:
       $ yarn --version
       1.12.3
       Use the engines section of your package.json to specify the version of
       Yarn to use on Heroku.
       "engines": {
         "yarn": "1.x"
       }

       https://help.heroku.com/8MEL050H
```

* The new webpacker doesn't depend on python

* fix node build thing via chatgpt
  • Loading branch information
mikegee authored Nov 15, 2024
1 parent 7c17db5 commit 290ac73
Show file tree
Hide file tree
Showing 9 changed files with 7,832 additions and 13,478 deletions.
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

20 changes: 8 additions & 12 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.7.2'
ruby '3.2.2'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.1'
gem 'rails', '~> 7.0.0'
# Use Puma as the app server
gem 'puma', '~> 4.1'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 4.0'
gem 'webpacker', '~> 5.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
Expand All @@ -21,9 +21,8 @@ gem 'jbuilder', '~> 2.7'
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'
gem 'devise'
gem 'devise', '~> 4.8.1'
gem 'jquery'
gem 'material_design_icons'
gem 'materialize-sass'
gem 'omniauth', '>= 1.9', '< 2'
gem 'omniauth-slack', github: 'kmrshntr/omniauth-slack'
Expand All @@ -49,13 +48,10 @@ end
group :development do
gem 'listen', '~> 3.2'
gem 'pry-rails'
gem 'rubocop'
gem 'rubocop-minitest'
gem 'rubocop-performance'
gem 'rubocop-rails'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
gem 'rubocop', require: false
gem 'rubocop-minitest', require: false
gem 'rubocop-performance', require: false
gem 'rubocop-rails', require: false
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
end
Expand Down
Loading

0 comments on commit 290ac73

Please sign in to comment.