I use the following to setup my innate apps with passenger.
That's my
config.ru. You should only change <demo> appropriately with
the name of your main ruby app file (my main app file is called
demo.rb)
--------------------
##
config.ru
require 'rubygems'
require 'innate'
require 'demo'
require ::File.expand_path('../demo', __FILE__)
Innate.start :started => true
Innate.options.mode = :live
run Innate
--------------------
Inside your main app file you have to exclude/comment Innate.start and
options
#Innate.options.adapter.port = 8080
#Innate.options.adapter.handler = :webrick
#Innate.start
So my demo.rb it looks like this:
-------------------------------------
#demo.rb
# encoding: utf-8
#add your needed gems
require 'rake'
require 'logger'
#require another ruby files (views,layout...)
v=FileList['view/*.rb']
l=FileList['layout/*.rb']
[v, l].each do |f|
unless f.length == 0
f.each {|ti| require f }
end
end
class Demo1
Innate.node '/'
provide :html, :engine=>:Etanni, :type=>'text/html'
helper :xhtml, :render, :aspect #js,partial_render,before/after/wrap
def index
#whatever
end
.....
end
-------------------------
In httpd.conf add the following (i use `gem install passenger` instead
of mod_rails, so it may be slightly different) :
#httpd.conf
#Load Passenger
LoadModule passenger_module /usr/lib64/ruby/gems/1.8/gems/
passenger-2.2.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib64/ruby/gems/1.8/gems/passenger-2.2.11
PassengerRuby /usr/bin/ruby18
#PassengerMaxPoolSize
#Default: 6
PassengerMaxPoolSize 3
#PassengerPoolIdleTime
#Default: 300
PassengerPoolIdleTime 144
#PassengerMaxInstancesPerApp < PassengerMaxPoolSize
PassengerMaxInstancesPerApp 2
#Must be used with RailsBaseURI in vhost
RailsAutoDetect off
RackAutoDetect off
Create a directory public inside your app directory and create your
apache virtualhost to point in the proper location:
#
<VirtualHost *:80>
ServerAdmin
ad...@yourdomain.org
ServerName
www.yourdomain.org
ServerAlias
yourdomain.org
ServerSignature On
<Directory "/home/danube/rls/myinnateapp">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
RackBaseURI /
DocumentRoot "/home/danube/rls/myinnateapp/public"
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i
\"" combined
ErrorLog /home/danube/rls/myinnateapp/apache2-error.log
CustomLog /home/danube/rls/myinnateapp/apache2-access.log combined
</VirtualHost>
Vag
On 9 Οκτ, 11:04, Hamza Khan-Cheema <
hamz...@gmail.com> wrote:
> Hi,
>
> I have made a simple blog engine with innate and I want to deploy it to
> passenger. But I can't seem to find much documentation on what to put in
> the
config.ru file. How to deploy a Ramaze app is in the manual :
>
>
http://www.modrails.com/documentation/Users%20guide%20Apache.html#_ra...