Welcome 微信登录

首页 / 操作系统 / Linux / Ubuntu下Ruby、Rails、Passenger安装

Ubuntu下Ruby、Rails、Passenger安装ruby$ sudo apt-get install ruby ruby-dev irb libopenssl-rubygem$ sudo apt-get install rubygems
$ vi ~/.bashrcexport PATH="$PATH":/var/lib/gems/1.8/bin$ source ~/.bashrcrails$ sudo gem install railspassenger$ sudo gem install passenger
$ sudo /var/lib/gems/1.8/bin/passenger-install-apache2-moduleChecking for required software... * GNU C++ compiler... found at /usr/bin/g++
 * Ruby development headers... found
 * OpenSSL support for Ruby... found
 * RubyGems... found
 * Rake... found at /var/lib/gems/1.9.0/bin/rake
 * Apache 2... found at /usr/sbin/apache2
 * Apache 2 development headers... not found
 * Apache Portable Runtime (APR) development headers... not found
 * Apache Portable Runtime Utility (APU) development headers... not found$ sudo apt-get install apache2-prefork-dev libapr1-dev libaprutil1-dev
$ sudo /var/lib/gems/1.8/bin/passenger-install-apache2-module
Please edit your Apache configuration file, and add these lines:   LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so
   PassengerRoot /var/lib/gems/1.8/gems/passenger-2.2.4
   PassengerRuby /usr/bin/ruby1.8
...
Suppose you have a Ruby on Rails application in /somewhere. Add a virtual host
to your Apache configuration file, and set its DocumentRoot to
/somewhere/public, like this:   <VirtualHost *:80>
      ServerName www.yourhost.com
      DocumentRoot /somewhere/public    # <-- be sure to point to "public"!
   </VirtualHost>passenger apache设定$ cd /etc/apache2/mods-available
$ sudo vi rails.loadLoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so$ sudo vi rails.confPassengerRoot /var/lib/gems/1.8/gems/passenger-2.2.4
PassengerRuby /usr/bin/ruby1.8$ sudo vi /etc/apache2/sites-available/yoursite<VirtualHost *:80>
   ServerName www.yourhost.com
   DocumentRoot /somewhere/public
...$ sudo a2enmod rails
$ sudo a2ensite yoursite
$ sudo /etc/init.d/apache2 restartUbuntu 9.04下体验Adobe AIR 1.5.1应用指南[图文]Ubuntu 9.04的安装配置过程备忘相关资讯      Ubuntu教程 
  • Ubuntu教程 - 使用Ubuntu拷贝CD和  (12/18/2013 14:38:16)
  • 让Ubuntu 12.10支持RAR和7Z文件解  (11/15/2012 18:51:50)
  • Windows 7硬盘安装Ubuntu 12.10图  (11/03/2012 19:22:47)
  • 完美安装Ubuntu 12.10最新AMD显卡  (11/27/2012 08:17:47)
  • Win 7硬盘安装Ubuntu 12.10  (11/05/2012 13:30:34)
  • 虚拟机上Ubuntu 11.10升级到12.04  (10/12/2012 20:00:38)
本文评论 查看全部评论 (0)
表情: 姓名: 字数