rails new appnew -j esbuild --css tailwind -d postgresql
cd appnew
rails db:create
for now change to use node default on hatchbox by doing:
-
add .node-version file with
18.12.1
-
update package.json with this just after
"private": "true"
, "engines": { "node": "18.12.1" }
./bin/dev
to run
Add gem "view_component"
to Gemfile
Change tailwind.conifg.js content section as follows:
content: [
'./public/*.html',
'./app/helpers/**/*.rb',
'./app/javascript/**/*.js',
'./app/views/**/*.{erb,haml,html,slim}',
'./app/components/**/*.{rb,html,html.erb,yml}'
]
yarn add "@tailwindcss/aspect-ratio"
yarn add "@tailwindcss/forms"
yarn add "@tailwindcss/line-clamp"
yarn add "@tailwindcss/typography"
Update tailwind.conifg.js plugins as follows
plugins: [
require("@tailwindcss/forms"),
require("@tailwindcss/aspect-ratio"),
require("@tailwindcss/typography"),
require('@tailwindcss/line-clamp'),
],
Run bundle lock --add-platform x86_64-linux
before trying to deploy
## Debugging
Add the pry and pry-remote into :development, :test
group:
group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri mingw x64_mingw ]
gem "pry", "~> 0.13.1"
gem "pry-remote", "~> 0.1.8"
end