How To Install Ruby on Rails with PostgreSQL on Rocky Linux 8
How To Install Ruby on Rails with PostgreSQL on Rocky Linux 8
in This Tutorial you will Learn " How To Install Ruby on Rails with PostgreSQL on Rocky Linux 8"
Ruby on Rails or RoR or Rails is a free and open-source web application framework written in Ruby with the MIT License. It is a full-stack web framework that uses the model-view-controller (MVC) pattern.
The Rails web framework provides structures for a database, web service, and web pages. Also, Rails includes some important tools such as scaffolding, Puma, Gems, etc.
PostgreSQL is an advanced, enterprise-class, and open-source relational database system.
_________________________________________________________________________________________
Server - Os: Rocky Linux 8.5 64Bit | IP -192.168.1.20 | Hostname - www.primaryhost.com
_________________________________________________________________________________________
cat /etc/system-release ; sestatus ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - ; curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -
curl -L get.rvm.io | bash -s stable
source /etc/profile.d/rvm.sh
rvm reload ; rvm requirements run
rvm install ruby
dnf module enable nodejs:14
dnf install nodejs npm -y
npm install -g yarn
echo "export PATH=$PATH:/usr/local/bin" >> ~/.bashrc
source ~/.bashrc
gem install rails
dnf install postgresql-devel postgresql-server libpq-devel -y
postgresql-setup --initdb
nano /var/lib/pgsql/data/pg_hba.conf
systemctl restart postgresql
sudo -u postgres psql
create role rails_dev with createdb login password 'abc123';
rails new myapp -d postgresql
cd myapp/ ; nano config/database.yml
username: rails_dev
password: abc123
host: localhost
port: 5432
database: myapp_test
host: localhost
port: 5432
username: rails_dev
password: abc123
rails db:setup
rails db:migrate
rails s -b 192.168.1.20 -p 8080
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Related Posts:
- How To Setup LVS (Linux Virtual Server) Load Balancer on Rocky Linux 8.5
- How To Install Magento 2.4 on Rocky Linux 8
- How To Install Docker on Oracle Linux Server 9
- How to Install WHM/cPanel in Almalinux?
- Configure NTP Server in Oracle Linux 9
- How To Install Ruby on Rails with PostgreSQL on Rocky Linux 8
- How To Install EMQX MQTT Broker on Rocky Linux 8
- How To Install Kamailio SIP Server on Rocky Linux 8
- How to Install and Configure RabbitMQ Server on Rocky Linux 8
- Setup Quick DNS Server On Rocky Linux 8.5 Using Dnsmasq
Latest Posts
- Server-Side Scripting: PHP, Node.js, Python – A Detailed Comparison
- Securing Your Website in 2024: Essential Strategies for Online Safety
- The Future of Web Development Technologies: Trends to Watch in 2024
- How Banks Handle Server-Side Operations and Ensure System Security: An Inside Look
- Tips for Writing Clean, Understandable, and Efficient Code: Avoiding Garbage Code
- Tailwind CSS: Revolutionizing Modern Web Design
- Basic Linux Commands for Beginners: A Starter Guide
- Dairy Farming Loan Apply
- BSNL Recharge Plan
- Bijli Bill Mafi Yojana Online Apply
Technical
- DevOps Roadmap
- How To Install and Configure an SNMP on Ubuntu 20.04
- Apple releases iOS 18 Developer Beta 2 with iPhone screen mirroring, RCS toggle,and more
- How to enable SNMP on Ubuntu Linux 18.04 and above
- How to Force HTTPS Using .htaccess (Updated 2024)
- Display All PHP Errors: Basic & Advanced Usage
- PHP alert
- MongoDB loads but breaks, returning status=14
- MongoDB database deleted automatically
- MongoDB all Error Solutions
Category