Rails 7.1.3.4 Project Setup

1. Create a New Rails Application

rails _7.1.3.4_ new <project_name> -j esbuild

2. Configure Default Ruby and Node.js Versions

echo "22.13" > .nvmrc > .node-version
echo "3.3.5" > .ruby-version

rbenv install
nvm install

3. Update .gitignore File from Wheel

curl -o ".gitignore" "<https://raw.githubusercontent.com/bigbinary/wheel/main/.gitignore>"

4. Remove Fixtures

5. Fix Missing prettyprint.rb Error

If encounter with an error like LoadError: cannot load such file -- /home/manas/.rbenv/versions/3.3.5/lib/ruby/gems/3.3.0/gems/prettyprint-0.2.0/lib/prettyprint.rb (LoadError) , then run:

gem install prettyprint
bundle install

6. Creating database

SQlite3 database is the default database for a newly created Rails application.

Run this command to create databases:

bundle exec rails db:create

7. Starting the server

bundle exec rails server