Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gigsforlinux/1acab264bcf2ba7399ccd114d09a0445 to your computer and use it in GitHub Desktop.
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
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
@gigsforlinux
Copy link
Author

Screenshot from 2022-08-01 00-21-56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment