VPS en dedicated servers (centrum voor hostingbeheer) Help

Installing Ruby on Rails (RoR) on Linux

Getting RoR up and running means working with a few moving parts. That said, with a little bit of tweaking of various config files and making sure that Ruby, Rails and various other subparts are all up and running, this is totally doable. If you're familiar with the various package managers (e.g. yum, apt) and comfortable updating config files, it's pretty straightforward.

DIFFICULTY Basic - 1 | Medium - 2 | Advanced - 3
RELATED PRODUCTS Linux-based VPS or dedicated servers

Install Git

sudo apt-get install git


yum install git

Install Ruby Version Manager (RVM)

curl -sSL https://get.rvm.io | bash

Start Ruby Version Manager (RVM)

source /etc/profile.d/rvm.sh

Test for successful RVM install.

Open terminal and execute the following:

type rvm | head -1

You should see the following result:

rvm is a function

Install additional dependencies.

rvm requirements

Install Ruby

rvm install 2.1.2

Select the version.

rvm use 2.1.2

Ensure the current Ruby version is installed

ruby -v

Install Rails

gem install rails

Install sqlite

apt-get install libsqlite3-dev


yum install sqlite-devel

Test your installation with a sample application using Ruby on Rails

rails new my_test_app
cd my_test_app

You'll need to ensure that JavaScript is set up in your Gemfile. To do this

nano Gemfile

Add the following two lines at the end:

gem 'execjs'
gem 'therubyracer'

Save and close the Gemfile.

Install everything and start the Rails server

bundle install
rails server

Things should now be running.

Check to make sure everything is working

Go to http://your_domain_or_IP_address:3000

You should see a page that indicates that
my_test_app is running.

Was dit artikel nuttig?
Hartelijk dank voor je feedback. Gebruik het supporttelefoonnummer of de bovenstaande chatoptie als je een vertegenwoordiger van de afdeling Klantenondersteuning wilt spreken.
Fijn dat we konden helpen! Kunnen we nog iets voor je doen?
Dat spijt ons. Vertel ons wat je verwarrend vond of waarom je probleem niet is opgelost via de geboden oplossing.