{"id":14098,"date":"2024-06-17T10:59:18","date_gmt":"2024-06-17T07:59:18","guid":{"rendered":"http:\/\/local.brightwhiz\/?p=14098"},"modified":"2024-06-17T10:59:19","modified_gmt":"2024-06-17T07:59:19","slug":"set-up-to-install-ruby-on-rails-on-almalinux-8-10-systems","status":"publish","type":"post","link":"http:\/\/local.brightwhiz\/set-up-to-install-ruby-on-rails-on-almalinux-8-10-systems\/","title":{"rendered":"Set up to Install Ruby On Rails on AlmaLinux 8.10 Systems"},"content":{"rendered":"\n
Ruby on Rails, often simply called Rails, is a powerful web application framework written in Ruby. It is designed to make programming web applications easier by making assumptions about what every developer needs to get started. This guide will walk you through the steps to install Ruby on Rails on AlmaLinux 8.10.<\/p>\n\n\n\n
Before starting, ensure you have:<\/p>\n\n\n\n
First, update your system to ensure all existing packages are up to date.<\/p>\n\n\n\n
$ sudo dnf update -y<\/code><\/pre>\n\n\n\nStep 2: Install Dependencies<\/h3>\n\n\n\n
Install essential development tools and libraries required for building Ruby and other dependencies.<\/p>\n\n\n\n
$ sudo dnf groupinstall -y "Development Tools"\n$ sudo dnf install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison sqlite-devel<\/code><\/pre>\n\n\n\nStep 3: Install RVM (Ruby Version Manager)<\/h3>\n\n\n\n
RVM (Ruby Version Manager) allows you to install and manage multiple Ruby environments.<\/p>\n\n\n\n
Install GPG Keys<\/h4>\n\n\n\n
Install the GPG keys required to use RVM.<\/p>\n\n\n\n
$ sudo dnf install -y gpg\n$ gpg --keyserver hkp:\/\/keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3<\/code><\/pre>\n\n\n\nInstall RVM<\/h4>\n\n\n\n
Download and install RVM.<\/p>\n\n\n\n
$ curl -sSL https:\/\/get.rvm.io | bash -s stable<\/code><\/pre>\n\n\n\nLoad RVM into your shell session.<\/p>\n\n\n\n
$ source ~\/.rvm\/scripts\/rvm<\/code><\/pre>\n\n\n\nStep 4: Install Ruby<\/h3>\n\n\n\n
With RVM installed, you can now install Ruby. For this guide, we\u2019ll install the latest stable version of Ruby.<\/p>\n\n\n\n
$ rvm install 3.1.2\n$ rvm use 3.1.2 --default<\/code><\/pre>\n\n\n\nVerify the Ruby installation.<\/p>\n\n\n\n
$ ruby -v<\/code><\/pre>\n\n\n\nYou should see output similar to:<\/p>\n\n\n\n
ruby 3.1.2p0 (2022-04-12 revision 0) [x86_64-linux]<\/code><\/pre>\n\n\n\nStep 5: Install Node.js and Yarn<\/h3>\n\n\n\n
Rails uses Node.js for the Asset Pipeline, and Yarn is used to manage JavaScript dependencies.<\/p>\n\n\n\n
Install Node.js<\/h4>\n\n\n\n
Install Node.js from the NodeSource repository.<\/p>\n\n\n\n
$ curl -sL https:\/\/rpm.nodesource.com\/setup_16.x | sudo bash -\n$ sudo dnf install -y nodejs<\/code><\/pre>\n\n\n\nInstall Yarn<\/h4>\n\n\n\n
Add the Yarn repository and install Yarn.<\/p>\n\n\n\n
$ curl --silent --location https:\/\/dl.yarnpkg.com\/rpm\/yarn.repo | sudo tee \/etc\/yum.repos.d\/yarn.repo\n$ sudo dnf install -y yarn<\/code><\/pre>\n\n\n\nStep 6: Install Rails<\/h3>\n\n\n\n
Finally, install Rails using the gem package manager.<\/p>\n\n\n\n
$ gem install rails -v 7.0.3<\/code><\/pre>\n\n\n\nVerify the Rails installation.<\/p>\n\n\n\n
$ rails -v<\/code><\/pre>\n\n\n\nYou should see output similar to:<\/p>\n\n\n\n
Rails 7.0.3<\/code><\/pre>\n\n\n\nStep 7: Set Up a New Rails Application<\/h3>\n\n\n\n
To ensure everything is working correctly, create a new Rails application. Navigate to the directory where you want to create your application and run:<\/p>\n\n\n\n
$ rails new myapp\n$ cd myapp<\/code><\/pre>\n\n\n\nStep 8: Start the Rails Server<\/h3>\n\n\n\n
Start the Rails server to make sure your application is running correctly.<\/p>\n\n\n\n
$ rails server<\/code><\/pre>\n\n\n\nOpen a web browser and navigate to http:\/\/localhost:3000<\/code>. You should see the Rails welcome page, indicating that everything is set up correctly.<\/p>\n\n\n\nConclusion<\/h3>\n\n\n\n
You have successfully installed Ruby on Rails on your AlmaLinux 8.10 system. This powerful framework is now ready for you to start developing web applications. For more detailed configurations and optimizations, refer to the official documentation of each component:<\/p>\n\n\n\n
\n- Ruby Documentation<\/a><\/li>\n\n\n\n
- Rails Guides<\/a><\/li>\n\n\n\n
- RVM Documentation<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"
Ruby on Rails, often simply called Rails, is a powerful web application framework written in Ruby. It is designed to make programming web applications easier by making assumptions about what…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,23,9,27,16],"tags":[1282,193,354,424,433,449,982,531,573,591,635,636],"yoast_head":"\n
How to Install Ruby On Rails on AlmaLinux 8.10 Systems<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n