Last active
December 15, 2022 06:24
-
-
Save choyno/03aac8efd0a242f035c9c91da9619acb to your computer and use it in GitHub Desktop.
THE LIFE OF RAILS 7 using ESBUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> BRANCH MAIN : CSS AND BOOSTRAP ONLY | |
> BRANCH CRUD : FXING JS ISSUE USING HOTWIRE AND STIMULUS WITH CRUS SAMPLE | |
https://github.com/choyno/rails_7_esbuild_boostrap | |
> RUN LOCAL | |
bin/dev | |
rails db:migrate | |
rails db:seed | |
> SPECS!! Create Specific Rails version | |
mkdir @appname | |
cd @appname | |
echo 3.0.0 > .ruby-version | |
echo "source 'https://rubygems.org'" > Gemfile | |
echo "gem 'rails', '~>7.0.4'" >> Gemfile | |
rvm gemset use 3.1.3@sample_rails_test --create | |
bundle install | |
bundle exec rails new . --force --skip-bundle --skip-test-unit --api | |
bundle exec rails new . --force --skip-bundle --skip-test-unit --database=postgresql --api | |
gem install bundler | |
sudo gem install bundler | |
> OR WITH CSS | |
bundle exec rails new . --force --skip-bundle --skip-test-unit --database=postgresql -j esbuild --css bootstrap | |
> !!REMINDER: make sure to install the node and yarn!! | |
brew install npm | |
npm install -g yarn | |
> bundle add cssbundling-rails | |
./bin/rails css:install:bootstrap | |
.bin/rails javascript:install:esbuild | |
> Fxing JS Issue | |
yarn add @hotwired/turbo-rails | |
yarn add @hotwired/stimulus | |
>add this to your app/javascript/application.js | |
import "@hotwired/turbo-rails" | |
import * as bootstrap from "bootstrap" | |
NEW MAC OS ISSUE PG | |
> 2022 | |
https://juanitofatas.com/fragments/pg | |
brew reinstall icu4c | |
brew services restart postgresql | |
> DELETE ISSUE RAILS | |
https://github.com/rails/rails/issues/44185 | |
> HOW TO INSTALL CSS AND JS AND FIX JS ISSUE | |
https://mixandgo.com/learn/ruby-on-rails/how-to-install-bootstrap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment