Table of Contents
- Step 1: Installing dependencies
- Step 2: Installing Git
- Step 3: Installing rbenv
- Step 4: Installing Ruby
- Step 5: Installing RoR
- Step 6: Installing Node.js
- Step 7: Creating a test application
Ruby on Rails (RoR) is a framework written in the Ruby programming language that allows you to use Ruby in combination with HTML, CSS, and similar programming languages.
Step 1: Installing dependencies
First off, we’ll need to install some dependencies. Update your apt-get first though:
Then, install these dependencies:
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
Step 2: Installing Git
To install Ruby, we’ll need Git. To install Git:
apt-get install git
git config --global user.name "John Appleseed" git config --global user.email "email@example.com"
Step 3: Installing rbenv
rbenv is a tool used for deploying Ruby environments.
To do this, execute the following commands after making sure you’re in the
git clone git://github.com/sstephenson/rbenv.git .rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile echo 'eval "$(rbenv init -)"' >> ~/.bash_profile git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bash_profile source ~/.bash_profile
Step 4: Installing Ruby
rbenv, we can install Ruby with it:
rbenv install -v 2.2.1 rbenv global 2.2.1
Install the the Bundler gem:
gem install bundler
Step 5: Installing RoR
After installing Ruby, we’ll need to install RoR. You can install this gem:
gem install rails
Now check if Rails was successfully installed by checking its version:
Step 6: Installing Node.js
Update your apt-get first, then install Node.js.
apt-get update apt-get install nodejs
Step 7: Creating a test application
In order to determine if our Rails installation was successful, we’re going to try to create a test application. Make sure you’re in
rails new test
Go to the
~/test directory which has just been created, then start your Rails application.
rails server --binding=YourServerIP
You can now visit your website at:
Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!