query: tag:mod_rails

PassengerはRackに対応しているので、Merbも動かすごとができます。

以下のように、Merbアプリケーションのディレクトリの直下に
config.ruファイルを作成して置くだけです。

ruby>>
require 'rubygems'
require 'merb-core'
Merb::Config.setup(:merb_root => ".",
:environment => ENV['RACK_ENV'])
Merb.environment = Merb::Config[:environment]
Merb.root = Merb::Config[:merb_root]
Merb::BootLoader.run

Uncomment if your app is mounted at a suburi

#if prefix = ::Merb::Config[:path_prefix]

use Merb::Rack::PathPrefix, prefix

#end

run Merb::Rack::Application.new
<<--

ちなみに ru はRack Upの事だと思われます。

ハマった点として、
Merbアプリのひな形の"/"で表示される画面は、エラーページなので、
production環境のPassengerで動かすとエラーとして扱われてしまいます。
なので、動作確認する場合、
なにかしらコントローラを作ってから試す必要があります。

posted by genki genki on Thu 20 Nov 2008 at 12:04 with 0 comments

このブログシステムは、今までmongrel_clusterで動かしていましたが、
passenger-2.0.1に移行しました。

特に不具合もなく動いているようです。
また、今までmemcache-clientの挙動が安定していなかったのですが、
なぜかpassengerにしたら解決。

posted by genki genki on Sun 29 Jun 2008 at 03:55 with 0 comments

Passengerを設定する手順のメモ。

  1. まずはsudo gem install passenger
  2. apacheの設定ファイルに以下を記述
    pre>>

for Passenger

LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.5/ext/apache2/mod_passenger.so
RailsSpawnServer /usr/local/lib/ruby/gems/1.8/gems/passenger-1.0.5/bin/passenger-spawn-server
RailsRuby /usr/local/bin/ruby
<<--
Ruby Enterprise Edition
とかを使う場合は、RailsRubyを切り替えたりしたら良いのかな。
まだ試してないですが、すんなりいけそうな気がします。
3. VirtualHostの設定
pre>>
NameVirtualHost *:80
<VirtualHost *:80>
ServerName foobar.com
DocumentRoot /mnt/app//current/public

(-- snip --)

<Directory /mnt/app//current/public>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all


<<--

あとはApacheを再起動するだけ。簡単ですね。

posted by genki genki on Sun 15 Jun 2008 at 12:43 with 0 comments

http://blog.dreamhost.com/2008/05/13/passenger-for-ruby-on-rails/

話題になっていたPassengerですが、Dreamhostで採用されました。masuidriveさんもオススメのようなので、ぜひ使ったみたいです。

http://rails20.jp/2008/04/passenger/
http://www.moongift.jp/2008/04/passenger/
http://blog.masuidrive.jp/index.php/2008/04/12/deploy_rb_and_apache_conf_generator_for_mod_rail/

posted by satoko satoko on Thu 15 May 2008 at 05:24 with 0 comments

以前紹介したPassenger (別名mod_rails)がリリースされたようです。

Passenger mod_rails for Apache

Gemで配布されているので、インストールは以下でOK.

sh>>
% sudo gem install passenger
<<--

DHHも記事を書いてます。

Passenger (mod_rails for Apache) launches

The guys at Phusion has finally wrapped up Passenger, their mod_rails-like module for Apache. It’s looking like a great, easy solution for people who want a more PHP-like deployment story.

今後が楽しみですね。

個人的にはEbb+swiftiplyの動向が気になってます。

See Also

posted by genki genki on Sat 12 Apr 2008 at 11:25 with 1 comment