ftnk.jp -> ~fumi -> ChangeLog -> 2009-05 -> 2009-05-10

前の日 / 次の日 / 最新 / 2009-05

2009-05 / 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

2009-05-10 Sun

[別の年の同じ日: 2003 2004 2006 2007 2008 2010

Sinatra + Passenger [Apache][Ruby] はてぶ

Passenger 経由で Sinatra で作ったアプリケーションにアクセスするには,
アプリケーションのあるディレクトリに
1. config.ru
2. public ディレクトリ
3. tmp ディレクトリ
を用意する.

config.ru の内容は

require 'app' # Sinatra アプリケーション
run Sinatra::Application

あとは httpd.conf に

<VirtualHost sinatra.example.com>
  ServerName sinatra.example.com
  DocumentRoot /path/to/SinatraApp/public
</VirtualHost>
などと書いておけばよい.

- Sinatraで鼻歌まじりのWeb開発
  http://www.slideshare.net/dara/sinatraweb?type=powerpoint
- Phusion Passenger をインストール [2009-05-10-2]

Phusion Passenger をインストール [Apache][Ruby] はてぶ

Rails アプリケーションを実行するための Apache モジュール Phusion Passenger をインストールしてみました.

インストール

# gem install passenger
# passenger-install-apache2-module # Apache モジュールのビルドとインストール

passenger-install-apache2-module で,
以下のような設定情報がでるので,これをもとに httpd.conf を書き換え.

LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2
PassengerRuby /usr/bin/ruby

<VirtualHost *:80>
  ServerName www.yourhost.com
  DocumentRoot /somewhere/public    # <-- be sure to point to 'public'!
</VirtualHost>

httpd.conf を書き換えて Apache を再起動しようとしたところ,
以下のエラーがでて起動できない.

 *** Passenger ERROR (ext/common/ApplicationPoolServer.h:602):
 Cannot execute /usr/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/ApplicationPoolServerExecutable: Permission denied (13)

- Re: Passenger 2.0.4 + Rails 2.2.2 + Centos 5.2 (Xen) = Help needed... - dlepage - com.googlegroups.phusion-passenger - MarkMail
  http://markmail.org/message/ukx2u5jr54nr4jbx
によると,SElinux が悪いらしいので,

# setenforce 0
すれば OK.

Referrer (Inside):
[2009-05-10-3] Sinatra + Passenger

Redmine をインストールしてみる [Redmine] はてぶ

mysqladmin -u root create redmine

cp config/database.yml.example config/database.yml
rake db:migrate RAILS_ENV=production
rake load_default_data RAILS_ENV=production