Please visit my website and subscribe to my youtube channel for more articles
Thank you for Subscribing! If you have not, Subscribe now! DevOps4Solutions helps in providing end to end solution and…
In this blog we will install all dependencies/ software which are required for the Installation of Ruby on Rails application.
Rails Installation on Linux
- Install dependencies
sudo yum install -y curl gpg gcc gcc-c++ make
2. Install RVM
RVM supports most UNIX like systems and Windows (with Cygwin or Bash on Ubuntu on Windows). The basic requirements are
gpg2 and overall GNU version of tools - but RVM tries to autodetect it and install anything that is needed.
Install GPG keys
sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ curl -sSL https://get.rvm.io | sudo bash -s stable
$ sudo usermod -a -G rvm `whoami`
On systems where sudo is configured with
secure_path, the shell environment needs to be modified to set
secure_path is set on most Linux systems, but not on macOS. The following command tries to autodetect whether it is necessary to install
rvmsudo_secure_path=1, and only installs the environment variable if it is the code.
if sudo grep -q secure_path /etc/sudoers; then sudo sh -c "echo export rvmsudo_secure_path=1 >> /etc/profile.d/rvm_secure_path.sh" && echo Environment variable installed; fi
Run rvm command and you will receive command not found. You have to relogin on the server
After relogin , run rvm — version
Install the latest version of Ruby
$ rvm install ruby
$ rvm --default use ruby
Check ruby version and sqlite3 version. You can use other databases as per your need
Bundler is a popular tool for managing application gem dependencies. We will use Bundler in this tutorial, so let us install it:
gem install bundler --no-rdoc --no-ri
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -sudo yum install -y nodejs
Before you install Rails, you should check to make sure that your system has the proper prerequisites installed. These include Ruby and SQLite3.
$ gem install rails
$ rails --version
Finally congratulations!! You have successfully followed each and every step for Installation of Ruby on Rails. All dependencies which are required for Ruby on Rails application is successfully installed.