Ubuntu下Ruby、Rails、Passenger安装

 

 

首页Linux教程

背景:

阅读新闻

Ubuntu下Ruby、Rails、Passenger安装

[日期:2009-07-05]   来源:Linux公社  作者:Linux编辑   [字体:]  

Ubuntu下Ruby、Rails、Passenger安装

ruby

$ sudo apt-get install ruby ruby-dev irb libopenssl-ruby

gem

$ sudo apt-get install rubygems
$ vi ~/.bashrc

export PATH="$PATH":/var/lib/gems/1.8/bin

$ source ~/.bashrc

rails

$ sudo gem install rails

passenger

$ sudo gem install passenger
$ sudo /var/lib/gems/1.8/bin/passenger-install-apache2-module

Checking 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
      DocumentRoot /somewhere/public    # <-- be sure to point to 'public'!
   </VirtualHost>

passenger apache设定

$ cd /etc/apache2/mods-available
$ sudo vi rails.load

LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.4/ext/apache2/mod_passenger.so

$ sudo vi rails.conf

PassengerRoot /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
   DocumentRoot /somewhere/public
...

$ sudo a2enmod rails
$ sudo a2ensite yoursite
$ sudo /etc/init.d/apache2 restart

Ubuntu 9.04下体验Adobe AIR 1.5.1应用指南[图文]

Ubuntu 9.04的安装配置过程备忘

相关资讯       Ubuntu教程 

   

本文评论   查看全部评论 (0)


评论声明

尊重网上道德,遵守中华人民共和国的各项有关法律法规

承担一切因您的行为而直接或间接导致的民事或刑事法律责任

本站管理人员有权保留或删除其管辖留言中的任意内容

本站有权在网站内转载或引用您的评论

参与本评论即表明您已经阅读并接受上述条款

 

 

 

最新资讯

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/28316.html