/rails_new

Smallest Rails 7.0.4.2 repo possible

Primary LanguageRubyMIT LicenseMIT

README

  • Ruby version: 3.2.1 (latest)

  • Rails version: 7.0.4.2 (latest)

How to create this repo

  1. Run gem install rails -pre if needed.
  2. Run rails new rails_new.
  3. Run cd rails_new; echo 'rvm use 3.2.10@ruby3.2-rails7.0 --create' > .rvmrc
  4. Created repo on Github and fixed .git/config. Run "git pull" to sync.
  5. Add .travis.yml file such as:
language: ruby
rvm:
  - 3.2.1
before_install: gem install bundler
cache: bundler
  1. Remove Gemfile comments. (egrep -v "^#|^ #" Gemfile |uniq) Removed most of the gem numbers.
  2. Optionally, add a LICENSE file.
  3. Add 3 sorbet gems.
gem 'sorbet', :group => :development
gem 'sorbet-runtime'
gem 'sorbet-rails'
  1. Add 'dalli' and 'redis' gem to Gemfile to avoid sorbet error messages.
  2. Run "bundle" and fix any Gemfile syntax issues.
  3. Run "rails db:create db:migrate db:setup" to avoid sorbet error messages.
  4. Then to push to GitHub.

How to know if you have a sane repo

  1. Run bundle with no errors.
  2. Run rake (expect 0 tests) with no errors and 2 known warnings.
warning: class variable access from toplevel
  1. When you go to "localhost:3000" in browser, you expect to see "Yay!: You're on Rails!" message and no errors.