The -browsers variant includes Node LTS, so we no longer need to install
it manually. Also since the new image uses the root user, we need to
pass `--no-sandbox` to Chrome.
Spring 2.1.1 does something different with regards to the working
directory, such that `rails new` would fail with this error:
```
run bin/rake tmp:create… rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)
```
Work around this by enabling spring later in the `rails new` process.
If the app is deployed via tomo, there will be a .tomo_release.json file
with information about the git commit SHA and timestamp of the version
that was deployed. Use that information if present, otherwise gracefully
fall back.
In development and test environments, Rails automatically generates a
value for SECRET_KEY_BASE. So we don't need to worry about specifying it
in an environment var.
Remove livereload and other asset-pipeline specific customizations.
The preference when using this template is to pass `--skip-sprockets` to
disable the asset pipeline entirely. If this option is detected, the
template will create `app/javascript/stylesheets` and
`app/javascript/images` directories as an alternative to `app/assets`.
Configuring the app via a `.env` file is problematic because it affects
all environments, including test. The test environment should work
regardless of local configuration.
This commit more narrowly focuses the usage of dotenv by recommending a
`.env.development` file be used as opposed to `.env`. This limits the
effects to just the local development environment.
Also, there is no reason to load the dotenv gem in production.
`bundle exec puma` works great in production but it obscures console log
output when used in development. Live reloading of JS requires an extra
process, webpack-dev-server. Create a `Procfile.dev` to make it easier
to run all the right things locally.