Build Rails App with postgres db and webpacker:
rails new mercury-ai --webpacker -d=postgresql
rails webpacker:install
We went through talaria's Gemfile and decided what felt relevant to this application and brought it over. Scott came through later with some changes. Check out the Gemfile to see what ultimately made the cut.
We ran a bundle & cleaned up the rest of the gemfile (mostly comments and some spacing)
ran bundle: bundle
We added a few yarn packages
yarn add shakapacker
yarn add sass
yarn add typescript
ran yarn: yarn
Copied .rubocop.yml from talaria into our new repo
We kept every rule unless it applied to talaria-specific files
Picked MIT license arbitrarily — (we can fix this later)
rails new
to see what we wanted to keeprails db:setup
ensured consistent versioning in webpacker.yml due to warning from db:setup (this was in the config for webpacker)
then we needed to align shakapacker versioning between package.json and the gemfile
At this point, rails c
was now working
Since we already had the gem we just ran: rails g rspec:install
Scott ended up taking over the rest of the rspec setup
rails g cancan:ability
This generated some scaffolding that will allow us to give users permissions
rails credentials:edit environment=development
This command created the credentials file and created config/master.key
This all needs to go in the .gitignore file
Ran rubocop
on a new branch. There were many autocorrectable warnings so we took advantage of rubocop -A
to autocorrect. There was one other change we made manually.