VPS 및 전용 서버(호스팅 컨트롤 센터) 도움말

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
TIME REQUIRED 30 min
RELATED PRODUCTS Linux-based VPS or dedicated servers

Install Git

sudo apt-get install git

or

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

or

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.


이 글이 도움되었나요?
피드백을 보내주셔서 감사합니다. 고객 서비스 담당자에게 문의하시려면 지원 전화 번호 또는 위의 채팅 옵션을 이용하시기 바랍니다.
도와드릴 수 있어 기쁩니다! 더 도와 드릴 것이 있나요?
그것 유감스럽습니다. 혼동이 되었던 사항 또는 솔루션이 고객님의 문제를 해결하지 못했던 원인을 알려주세요.