|
阅读:1419回复:0
在Debian上安裝Ruby On Rails環境
在Debian上安裝Ruby On Rails環境
原文地址: http://color-magic.cn/archives/58 新起一個開發服務器,Debian系統,需要安裝Ruby on rails環境 參考: Ruby on Rails on Debian Debian下为Apache2配置FastCGI(mod-fcgid),PHP5,Perl,Python,ROR 已有環境:Apache2.2, php5 1.安裝Ruby # apt-get install ruby libzlib-ruby rdoc irb 2.安裝Gems 這裡與上面的參考不一樣,apt-cache search了一下發現可以直接apt-get安裝 # apt-get install rubygems 3.安裝Rails 同樣apt-cache search發現源裡面也有,但是怕出問題(什麼奇怪的想法),還是老老實實地用gem安裝了 gem install rails --include-dependencies 4.安裝fast_cgi和libfcgi-ruby1.8 和上面參考不一樣,它用的apache1.x,所以直接用libapache-mod-fastcgi,我的是2.2,試試裝了這東西: libapache2-mod-fcgid - an alternative module compat with mod_fastcgi # apt-get install libapache2-mod-fcgid libfcgi-ruby1.8 5.配置虛擬主機 這個不多說,虛擬主機目錄為rails應用下的public目錄,apache2需要打開rewrite引擎 # ln -s /etc/apache2/mods-available/rewrite.load /etc/apache2/mods-enabled/rewrite.load 並在虛擬主機中加入以下rewrite方案 RewriteEngine On # Let apache handle purely static files like images by itself. RewriteCond %{REQUEST_FILENAME} !-f # Send Everything else to Typo RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] http://color-magic.cn/archives/58 |
|
|