Подготовка окружения для проекта Ruby on Rails
Имеется операционная система Linux:
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
1) Создал пользователя marley.
# useradd \
-d /home/marley \
-m marley
# passwd marley
2) Подключаю репозитории
# vi /etc/yum.repos.d/repo.repo
[Centos]
name= Centos $releasever - $basearch
baseurl=http://mirror.centos.org/centos/6.3/os/x86_64/
gpgkey=http://mirror.centos.org/centos/6.3/os/x86_64/RPM-GPG-KEY-CentOS-6
gpgcheck=1
enabled=1
[Epel]
name= Epel $releasever - $basearch
baseurl=http://dl.fedoraproject.org/pub/epel/6/x86_64/
gpgkey=http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6
gpgcheck=1
enabled=1
# yum repolist
Ruby
# yum install -y \
mysql-devel \
postgresql-devel \
sqlite-devel
# curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enable
# source /etc/profile.d/rvm.sh
# gem install unicorn -v '4.6.2'
# gem install therubyracer -v '0.11.4'
$ mkdir rails_projects
$ cd rails_projects
$ rails new myApp1
Сервер unicorn
$ cd myApp1/
$ vi Gemfile
разкомментировал
gem 'unicorn'
gem 'therubyracer'
$ bundle install
$ bundle exec unicorn
http://192.168.1.10:8080/