После того, как вы вошли в систему как root, вы сможете запустить следующее, чтобы установить и работать Rails.
Выполните следующие команды на сервере:
yum install gcc-c++ glibc-devel httpd-devel automake autoconf libtool libtool-libs
cd /usr/local/src
wget ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.8.5.tar.gz
tar xzvf ruby-1.8.5.tar.gz
cd ruby-1.8.5
./configure --prefix=/usr && make && make instal
cd ..
wget http://rubyforge.org/frs/download.php/28174/rubygems-0.9.5.tgz
tar xvzf rubygems-0.9.5.tgz
cd rubygems-0.9.5
ruby setup.rb
cd ..
gem install rails
wget http://fastcgi.com/dist/fcgi-2.4.0.tar.gz
tar -xvzf fcgi-2.4.0.tar.gz
cd fcgi-2.4.0
./configure && make && make install
cd ..
wget http://fastcgi.com/dist/mod_fastcgi-2.4.2.tar.gz
tar -xvzf mod_fastcgi-2.4.2.tar.gz
cd mod_fastcgi-2.4.2
cp Makefile.AP2 Makefile
vi Makefile
Изменить:
top_dir = /usr/local/apache2
Кому:
top_dir = /usr/lib/httpd
Затем:
make && make install
cd ..
gem install fcgi
gem install mysql
(ПРИМЕЧАНИЕ: Если это не удается, сделайте следующее: gem install mysql - --with-mysql-include = / usr / include / mysql --with-mysql-lib = / usr / lib / mysql
)
vi /etc/httpd/conf.d/fastcgi.conf
User apache
Group apache
LoadModule fastcgi_module modules/mod_fastcgi.so
<IfModule mod_fastcgi.c>
FastCgiWrapper on
FastCgiConfig -idle-timeout 900
FastCgiIpcDir /tmp/fastcgi_ipc/
AddHandler fastcgi-script .fcgi .rb
</IfModule>
mkdir /tmp/fastcgi_ipc
chown -R apache.apache /tmp/fastcgi_ipc
chmod -R 755 /tmp/fastcgi_ipc
service httpd graceful
Here are some pointers:
http://ihassin.wordpress.com/2012/04/29/setting-up-a-rails-server-on-a-godaddy-vps/