rails new react-rails-webpacker
cd react-rails-webpacker
open Gemfile and ADD below gem
gem 'webpacker', '~> 3.3'
EDITING INSERT
# Compile source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
-install react-native-debugger vai hoomebrew: brew update && brew cask install react-native-debugger
-install redux-devtools-extension npm install --save redux-devtools-extension
-in package.json => object "scripts", by replacing PORT with your react native runnning port. by default it's 8081 "scripts":{ .... "debug" : "open 'rndebugger://set-debugger-loc?host=localhost&port=PORT'"
# first: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
# go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |
# Install linux update, followed by GCC and Make | |
sudo yum -y update | |
sudo yum install -y gcc make | |
# Install Nginx and PHP-FPM | |
sudo yum install -y nginx php-fpm | |
# Install PHP extensions | |
sudo yum install -y php-devel php-mysql php-pdo \ | |
php-pear php-mbstring php-cli php-odbc \ |