Forum: Ruby on Rails problem setting up lighttpd and rails app.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
32d1b70dcff9066a90976c0fb18acabe?d=identicon&s=25 Neil Dugan (Guest)
on 2006-01-23 00:41
(Received via mailing list)
I am trying to set-up lighttpd and rails to work with fastcgi.

Here is what I am currently using for the virtual host definition.  I
have gotten this from various websites.  Sorry about the formatting I
can't seem to control it with Thunderbird.


var.wholesale = "wholesale"
$HTTP["host"] =~ "^wholesale" {
   server.document-root = "/var/lighttpd/" + var.wholesale + "/public"
   accesslog.filename = "/var/lighttpd/" + var.wholesale +
"/log/lighttpd.log"
   #url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" )
   server.indexfiles = ( "dispatch.fcgi", "index.html" )
   server.error-handler-404 = "/dispatch.fcgi"
   fastcgi.server = ( ".fcgi" =>
     ( "localhost" =>
       ( "min-procs" => 2,
         "max-procs" => 2,
         "socket" => "/tmp/" + var.wholesale + ".fcgi.socket",
         "bin-path" => "/var/lighttpd/" + var.wholesale +
"/public/dispatch.fcgi",
         "bin-environment" => ( "RAILS_ENV" => "development" )
       )
     )
   )
   url.rewrite = ("^/$" =>
"/dispatch.fcgi?controller=home&action=index2",

"^/([\-_a-zA-Z0-9]+)/([\-_a-zA-Z0-9]+)/([\-_a-zA-Z0-9%]+)\??([\-_a-zA-Z0-9=&%]*)$"
  =>
			"/dispatch.fcgi?controller=$1&action=$2&id=$3&$4",
			"^/([\-_a-zA-Z0-9]+)/([\-_a-zA-Z0-9]+)/?\??([\-_a-zA-Z0-9=&%]*)$"  =>
				"/dispatch.fcgi?controller=$1&action=$2&$3",
			"^/([\-_a-zA-Z0-9]+)/?\??([\-_a-zA-Z0-9=&%]*)$"  =>
				"/dispatch.fcgi?controller=$1&action=index&$2"
   )
   cgi.assign = (".rb" => "/usr/bin/ruby", ".cgi" => "/usr/bin/ruby")

}



A couple of seconds after starting lighttpd I get this message repeated
twice.

/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:155:in
`read': No such file or directory -
/var/lighttpd/wholesale/public/../config/../config/environments/devlopment.rb
(Errno::ENOENT)
         from
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:155:in
`load_environment'
         from
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/core_ext/kernel.rb:27:in
`silence_warnings'
         from
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:152:in
`load_environment'
         from
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:81:in
`process'
         from
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:42:in `run'
         from /var/lighttpd/wholesale/public/../config/environment.rb:10
         from /var/lighttpd/wholesale/public/dispatch.fcgi:22

The file "devlopment.rb" does exist
$> ls -l /var/lighttpd/wholesale/config/environments/development.rb
-rw-r--r--  1 neil neil 800 Jan 20 15:01
/var/lighttpd/wholesale/config/environments/development.rb



Any help appreciated
Regards Neil.
This topic is locked and can not be replied to.