Created
May 13, 2023 22:35
-
-
Save giljr/06ab2dd8e146a65d7777e834e5178eb9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Installing nodejs and npm | |
Prerequisites | |
Ubuntu 18.04 or 20.04 | |
A user with sudo privileges. | |
1- Install Node.js and NPM from Ubuntu Repository | |
The easiest way to install Node.js and NPM is from the Ubuntu repository. | |
sudo apt update | |
sudo apt install nodejs | |
nodejs -v | |
sudo apt install npm | |
sudo apt install build-essential | |
npm -v | |
2- Install the Latest Yarn Version | |
corepack unable | |
corepack disable | |
sudo npm install -g yarn --force | |
yarn set version stable | |
yarn -v | |
node -v | |
links: | |
ruby releases - https://www.ruby-lang.org/en/downloads/releases/ | |
Install Ruby 3 - Upgrade Ruby Version with RVM (Ruby 2.7 to 3) https://youtu.be/YxnGDW-JC9Q | |
3- Installing RVM | |
Install | |
Pre-requisites | |
You need software-properties-common installed in order to add PPA repositories. | |
sudo apt-get install software-properties-common | |
sudo apt-add-repository -y ppa:rael-gc/rvm | |
sudo apt-get update | |
sudo apt-get install rvm | |
Add your user to rvm group ($USER will automatically insert your username): | |
sudo usermod -a -G rvm $USER | |
At terminal window, open the application menu, then Preferences. | |
Click on Unnamed profile, select the Command tab and check Run command as login shell. | |
Unnamed > Tab: Command > mark (x) Run command as a login user | |
Reboot | |
4 - RVM Installing a ruby | |
rvm autolibs disable | |
5- Finally install Ruby-3.0.0 | |
rvm install 3.0.0 | |
rvm use 3.0.0 | |
rvm list | |
rvm gemset create dummy-app | |
rvm use 3.0.0 | |
RVM Usage | |
RVM complete instructions are available at RVM repository: https://github.com/rvm/rvm | |
Additionally you can check manual pages too: open a Terminal (Ctrl+Alt+T) and run: | |
man rvm | |
links: | |
https://rvm.io/rvm/install | |
https://github.com/rvm/ubuntu_rvm | |
RVM | |
Install Ruby 3 - Upgrade Ruby Version with RVM (Ruby 2.7 to 3) | |
https://youtu.be/YxnGDW-JC9Q | |
6 - OpenSSl INSTALLATION: | |
sudo apt-get install libssl-dev | |
apt-get install libssl-dev | |
sudo apt-get install libssl-dev | |
sudo apt install openssl | |
sudo apt install libssl-dev | |
sudo make install | |
make | |
make install | |
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz | |
wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz.md5 | |
md5sum openssl-1.0.1g.tar.gz | |
cat openssl-1.0.1g.tar.gz.md5 | |
tar -xvzf openssl-1.0.1g.tar.gz | |
cd openssl-1.0.1g | |
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl | |
make | |
sudo make install | |
cd .. | |
/usr/local/openssl/bin/openssl version | |
cd openssl-1.0.1g/ | |
openssl version | |
------------------- | |
RUBY | |
1216 $ sudo apt-get install ruby-full | |
1217 sudo apt-get install ruby-full | |
1218 which ruby | |
1219 ruby --version | |
1220 mkdir rubyProjects | |
1221 cd rubyProjects/ | |
1222 code . | |
1223 rvm @global do gem install rubocop end | |
1224 gem install rubocop | |
1225 sudo gem install rubocop | |
1226 rails server | |
1227 cd blog/ | |
1228 rails s | |
1229 clear | |
1230 rails generate migration create_articles | |
1231 rails c | |
1232 rails routes --expanded | |
------------------ | |
1248 cd rubyProjects/ | |
1252 sudo rails new alpha-blog --css bootstrap | |
1253 cd alpha-blog/ | |
1254 ls | |
1257 sudo apt install ruby-bundler | |
1258 yarn add [email protected] jquery popper.js | |
1295 ls -lh | |
1298 sudo chown -R j3.j3 ~/rubyProjects/ | |
1299 ls -lh | |
1304 sudo apt install nodejs | |
1307 nodejs -v | |
1308 sudo apt install npm | |
1310 npm -v | |
1311 node -v | |
1312 corepack enable | |
1325 rake time:zones:all | |
1328 bundle exec rake time:zones:all | |
1330 Timezone | |
1339 rails console | |
1329 Time.now | |
1340 bundle install | |
1359 bundle exec rails assets:precompile | |
1364 corepack unable | |
1365 corepack disable | |
1366 npm install -g yarn --force | |
1367 sudo npm install -g yarn --force | |
1368 yarn -v | |
1369 yarn set version stable | |
1370 yarn -v | |
1374 sudo apt install build-essential | |
1380 sudo apt-get install software-properties-common | |
1381 sudo apt-add-repository -y ppa:rael-gc/rvm | |
1382 sudo apt-get update | |
1383 sudo apt-get install rvm | |
1384 rvm -v | |
1385 sudo usermod -a -G rvm $USER | |
1386 rvm -v | |
1387 reboot | |
1388 rvm -v | |
1425 rvm install 3.0.0 | |
ssl | |
1426 sudo apt-get install libssl-dev | |
1427 apt-get install libssl-dev | |
1428 sudo apt-get install libssl-dev | |
1429 sudo apt install openssl | |
1430 sudo apt install libssl-dev | |
1431 sudo make install | |
1432 make | |
1433 make install | |
1434 wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz | |
1435 wget http://www.openssl.org/source/openssl-1.0.1g.tar.gz.md5 | |
1436 md5sum openssl-1.0.1g.tar.gz | |
1437 cat openssl-1.0.1g.tar.gz.md5 | |
1438 tar -xvzf openssl-1.0.1g.tar.gz | |
1439 cd openssl-1.0.1g | |
1440 ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl | |
1441 make | |
1442 sudo make install | |
1444 cd .. | |
1445 /usr/local/openssl/bin/openssl version | |
1446 cd openssl-1.0.1g/ | |
1452 openssl version | |
1453 cd .. | |
1458 rvm gemset create alphablog | |
1459 rails new alphablog --css bootstrap | |
1460 bundle install | |
1461 bundle install --path vendor/bundle | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment