Created
August 4, 2022 10:56
-
-
Save gigsforlinux/1acab264bcf2ba7399ccd114d09a0445 to your computer and use it in GitHub Desktop.
I'll Do Anything Goes With Ruby On Rails - Web Application Framework For You
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
sudo apt update | |
##install dependencis | |
sudo apt install git curl libssl-dev libreadline-dev zlib1g-dev autoconf bison build-essential libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev | |
###After the complete installation of dependency packages, run the following command to clone both Rbenv and Ruby-build repositories at GitHub. | |
curl -sL curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash | |
##install ruby | |
rbenv install 3.1.2 | |
##To verify installation, run the following command: | |
rails -v | |
###Install postgresSql | |
sudo apt install postgresql postgresql-contrib libpq-dev -y | |
sudo systemctl start postgresql | |
sudo systemctl enable postgresql | |
sudo -i -u postgres psql | |
create role gigsforlinux with createdb login password 'Apl@12345#!'; | |
\du | |
## I am going to create a new application 'gigsforlinuxapp' with the default database PostgreSQL using the following 'rails' command. | |
rails new gigsforlinuxapp -d postgresql | |
### Now, run the rails command to generate and migrate database for our new Rails project. | |
rails db:setup | |
rails db:migrate | |
#Now its time to host application. Start the default rails web server using the following command: | |
rails s -b 0.0.0.0 -p 8080 | |
Author
gigsforlinux
commented
Aug 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment