This might be obvious to everyone but it is something that i haven''t been able to find an answer to. Do I need to have either scgi/fastcgi/cgi running on either lighttpd/apache for ruby scripts to work? If yes, why? I have installed the scgi server and i can get the service to run, i have also installed the following mod_fastcgi/2.4.2 mod_ruby/1.2.4 Ruby/1.8.2(2004-12-25) mod_scgi, but i still can''t run my rails cookbook app working on lighttpd or apache. i don''t know how to load my ruby site, what would my url be if my sever root is on c:\webdev\www? Am i missing something? Raily desperate -- Posted via http://www.ruby-forum.com/.
On 4/3/06, charl souma <charl.souma@gmail.com> wrote:> This might be obvious to everyone but it is something that i haven''t > been able to find an answer to. Do I need to have either > scgi/fastcgi/cgi running on either lighttpd/apache for ruby scripts to > work? If yes, why? I have installed the scgi server and i can get the > service to run, i have also installed the following mod_fastcgi/2.4.2 > mod_ruby/1.2.4 Ruby/1.8.2(2004-12-25) mod_scgi, but i still can''t run my > rails cookbook app working on lighttpd or apache. i don''t know how to > load my ruby site, what would my url be if my sever root is on > c:\webdev\www? Am i missing something? Raily desperateWhat errors are you getting? Your server root has nothing to do with the URL. If you''re trying to include "webdev/www" into your URL then that''s why it''s not working.
Do you need Apache/Lighty/SCGI/FCGI to learn ruby? you can just use WebRick for now and forget about FCGI, SCGI, CGI etc...or have you said to your boss that you''ll be having his latest project online next week? In this case if you bear with me one or two days I''ll be releasing a Rails deployment kit on WIndows using the latest tools available (Apache 2.2, FastCGI) stay tuned. You can always try InstantRails, I think that will do what you want. Gael On 03/04/06, charl souma <charl.souma@gmail.com> wrote:> This might be obvious to everyone but it is something that i haven''t > been able to find an answer to. Do I need to have either > scgi/fastcgi/cgi running on either lighttpd/apache for ruby scripts to > work? If yes, why? I have installed the scgi server and i can get the > service to run, i have also installed the following mod_fastcgi/2.4.2 > mod_ruby/1.2.4 Ruby/1.8.2(2004-12-25) mod_scgi, but i still can''t run my > rails cookbook app working on lighttpd or apache. i don''t know how to > load my ruby site, what would my url be if my sever root is on > c:\webdev\www? Am i missing something? Raily desperate > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Gael Pourriel wrote:> Do you need Apache/Lighty/SCGI/FCGI to learn ruby? you can just use > WebRick for now and forget about FCGI, SCGI, CGI etc...or have you > said to your boss that you''ll be having his latest project online next > week? > > In this case if you bear with me one or two days I''ll be releasing a > Rails deployment kit on WIndows using the latest tools available > (Apache 2.2, FastCGI) stay tuned. You can always try InstantRails, I > think that will do what you want. > > Gaelok that sounds great, i''m about to try instantrails, but not to use only to understand where i''m going wrong? i like to know what i''m doing wrong rather than just take the easy option out. thanks for your advice, i''m very keen to see your development, sounds like you are the right person to talk to. charl -- Posted via http://www.ruby-forum.com/.
James Ludlow wrote:> On 4/3/06, charl souma <charl.souma@gmail.com> wrote: >> This might be obvious to everyone but it is something that i haven''t >> been able to find an answer to. Do I need to have either >> scgi/fastcgi/cgi running on either lighttpd/apache for ruby scripts to >> work? If yes, why? I have installed the scgi server and i can get the >> service to run, i have also installed the following mod_fastcgi/2.4.2 >> mod_ruby/1.2.4 Ruby/1.8.2(2004-12-25) mod_scgi, but i still can''t run my >> rails cookbook app working on lighttpd or apache. i don''t know how to >> load my ruby site, what would my url be if my sever root is on >> c:\webdev\www? Am i missing something? Raily desperate > > What errors are you getting? > > Your server root has nothing to do with the URL. If you''re trying to > include "webdev/www" into your URL then that''s why it''s not working.i haven''t quite figured out how to add a new post for the same topic so i have to reply with quote. my document root entry in lighttpd is [server.document-root = "C:/lighttpd/htdocs"] i cant change it for some reason. port:3000;host:127.0.0.1, the url i was trying was wrong, but now i''ve tested the same app with webrick and it worked first time my url is http://127.0.0.1/message/new ,so it must be my lighttpd conf. the error i get is ''404 - Not Found''. you say i don''t need scgi for my rails site, i''m not playing with any of those fancy things until i can get a server(lighttpd) running with rails. i''m not on a deadline either, i''m mostly doing this because i want to learn from it and it''s a challenge -- Posted via http://www.ruby-forum.com/.
Hi Charl, First of all if you want to use Lighttpd on Windows you have to go with SCGI, I never got FastCGI to work with Lightty on Windows and I dont think anyone has, to be honest. So as far as installation is concerned you need to get SCGI Rails runner from Zed''s web site: http://www.zedshaw.com/projects/scgi_rails/ I believe mod_scgi for lightty shipped with lightty so you have nothing to do here, then follow the instructions here: http://www.zedshaw.com/projects/scgi_rails/lighttpd.html If you already have the SCGI server running then oyu should be there, just make sure the IP and Port in Lighttpd config and scgi.yaml in Rails/Config folder match, also make sure you have disable the POSIX signals, here''s an example of a SCGI.YAML config file: --- :password: XXXXXXXXXXXX :port: 9001 :logfile: log/scgi.log :config: config/scgi.yaml :disable_signals: true :control_url: druby://127.0.0.1:8999 :env: production :host: 127.0.0.1 You generate this using Rail runner scgi_ctrl script in your Rails folder, dont forget that scgi_cluster doesn''t work on Windows, you have to use scgi_service. Gael On 04/04/06, charl souma <charl.souma@gmail.com> wrote:> James Ludlow wrote: > > On 4/3/06, charl souma <charl.souma@gmail.com> wrote: > >> This might be obvious to everyone but it is something that i haven''t > >> been able to find an answer to. Do I need to have either > >> scgi/fastcgi/cgi running on either lighttpd/apache for ruby scripts to > >> work? If yes, why? I have installed the scgi server and i can get the > >> service to run, i have also installed the following mod_fastcgi/2.4.2 > >> mod_ruby/1.2.4 Ruby/1.8.2(2004-12-25) mod_scgi, but i still can''t run my > >> rails cookbook app working on lighttpd or apache. i don''t know how to > >> load my ruby site, what would my url be if my sever root is on > >> c:\webdev\www? Am i missing something? Raily desperate > > > > What errors are you getting? > > > > Your server root has nothing to do with the URL. If you''re trying to > > include "webdev/www" into your URL then that''s why it''s not working. > > i haven''t quite figured out how to add a new post for the same topic so > i have to reply with quote. my document root entry in lighttpd is > [server.document-root = "C:/lighttpd/htdocs"] i cant change it for some > reason. port:3000;host:127.0.0.1, the url i was trying was wrong, but > now i''ve tested the same app with webrick and it worked first time my > url is http://127.0.0.1/message/new ,so it must be my lighttpd conf. the > error i get is ''404 - Not Found''. you say i don''t need scgi for my rails > site, i''m not playing with any of those fancy things until i can get a > server(lighttpd) running with rails. i''m not on a deadline either, i''m > mostly doing this because i want to learn from it and it''s a challenge > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Gael Pourriel wrote:> Hi Charl, First of all if you want to use Lighttpd on Windows you have > to go with SCGI, I never got FastCGI to work with Lightty on Windows > and I dont think anyone has, to be honest. > So as far as installation is concerned you need to get SCGI Rails > runner from Zed''s web site: > http://www.zedshaw.com/projects/scgi_rails/ > I believe mod_scgi for lightty shipped with lightty so you have > nothing to do here, then follow the instructions here: > http://www.zedshaw.com/projects/scgi_rails/lighttpd.html > > If you already have the SCGI server running then oyu should be there, > just make sure the IP and Port in Lighttpd config and scgi.yaml in > Rails/Config folder match, also make sure you have disable the POSIX > signals, here''s an example of a SCGI.YAML config file: > > --- > :password: XXXXXXXXXXXX > :port: 9001 > :logfile: log/scgi.log > :config: config/scgi.yaml > :disable_signals: true > :control_url: druby://127.0.0.1:8999 > :env: production > :host: 127.0.0.1 > > You generate this using Rail runner scgi_ctrl script in your Rails > folder, dont forget that scgi_cluster doesn''t work on Windows, you > have to use scgi_service. > > Gaelok i believe you if you say so, i have already got scgi server running with signals off, my scgi.yaml file is identical, except in a different order. when i start the service i don''t get any indication that something has happend, but if i check the status i get the following ?[32m?[1mStatus as of Wed Apr 05 00:25:15 South Africa Standard Time 2006:?[0 PID: 976 Started: Wed Apr 05 00:22:40 South Africa Standard Time 2006 Connected Requests: 0 Conns/Second: Not Set Total Conns: 0 Max Simultaneous Conns: 1073741823 Shutdown Started: false Processing Time: 1.671 2.234 0.0 0.0 Current Settings: --- disable_signals: true host: 127.0.0.1 password: XXXXXXXXX config: config/scgi.yaml port: 9999 env: production logfile: log/scgi.log control_url: druby://127.0.0.1:8999 so it seems like it''s all good, but my app still doesn''t start 404 Not Found but a few seconds before i checked with webrick and it works i also can''t restart scgi ''gracefully'' get the following - is this due to POSIX being switched off C:\lighttpd\htdocs\contact>scgi_service config restart c:/ruby/lib/ruby/1.8/yaml.rb:129:in `initialize'': Permission denied - config (Errno::EACCES) no errors in my scgi.log file - thanks for your advice once a gain, hope you can spot what the problem is -- Posted via http://www.ruby-forum.com/.
Can you post your lighttpd.conf files? No you cant restart gracefully on windows. On 05/04/06, charl <charl.souma@gmail.com> wrote:> Gael Pourriel wrote: > > Hi Charl, First of all if you want to use Lighttpd on Windows you have > > to go with SCGI, I never got FastCGI to work with Lightty on Windows > > and I dont think anyone has, to be honest. > > So as far as installation is concerned you need to get SCGI Rails > > runner from Zed''s web site: > > http://www.zedshaw.com/projects/scgi_rails/ > > I believe mod_scgi for lightty shipped with lightty so you have > > nothing to do here, then follow the instructions here: > > http://www.zedshaw.com/projects/scgi_rails/lighttpd.html > > > > If you already have the SCGI server running then oyu should be there, > > just make sure the IP and Port in Lighttpd config and scgi.yaml in > > Rails/Config folder match, also make sure you have disable the POSIX > > signals, here''s an example of a SCGI.YAML config file: > > > > --- > > :password: XXXXXXXXXXXX > > :port: 9001 > > :logfile: log/scgi.log > > :config: config/scgi.yaml > > :disable_signals: true > > :control_url: druby://127.0.0.1:8999 > > :env: production > > :host: 127.0.0.1 > > > > You generate this using Rail runner scgi_ctrl script in your Rails > > folder, dont forget that scgi_cluster doesn''t work on Windows, you > > have to use scgi_service. > > > > Gael > > > ok i believe you if you say so, i have already got scgi server running > with signals off, my scgi.yaml file is identical, except in a different > order. when i start the service i don''t get any indication that > something has happend, but if i check the status i get the following > ?[32m?[1mStatus as of Wed Apr 05 00:25:15 South Africa Standard Time > 2006:?[0 > PID: 976 Started: Wed Apr 05 00:22:40 South Africa Standard Time > 2006 > Connected Requests: 0 > Conns/Second: Not Set > Total Conns: 0 > Max Simultaneous Conns: 1073741823 > Shutdown Started: false > Processing Time: 1.671 2.234 0.0 0.0 > Current Settings: > --- > disable_signals: true > host: 127.0.0.1 > password: XXXXXXXXX > config: config/scgi.yaml > port: 9999 > env: production > logfile: log/scgi.log > control_url: druby://127.0.0.1:8999 > > so it seems like it''s all good, but my app still doesn''t start 404 Not > Found but a few seconds before i checked with webrick and it works > > i also can''t restart scgi ''gracefully'' get the following - is this due > to POSIX being switched off > C:\lighttpd\htdocs\contact>scgi_service config restart > c:/ruby/lib/ruby/1.8/yaml.rb:129:in `initialize'': Permission denied - > config (Errno::EACCES) > no errors in my scgi.log file - thanks for your advice once a gain, hope > you can spot what the problem is > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Gael Pourriel wrote:> Can you post your lighttpd.conf files? > > No you cant restart gracefully on windows.here is half my conf file, the lower half is all commented, and i didn''t want to waste space on the forum - i''ve stared at this file until it put me to sleep hope it sheds some lighty # lighttpd configuration file # # use it as a base for lighttpd 1.0.0 and above # # $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $ ############ Options you really have to take care of #################### ## modules to load # at least mod_access and mod_accesslog should be loaded # all other module should only be loaded if really neccesary # - saves some time # - saves memory server.modules = ( "mod_rewrite", "mod_redirect", # "mod_alias", "mod_access", # "mod_cml", # "mod_trigger_b4_dl", # "mod_auth", # "mod_status", # "mod_setenv", # "mod_fastcgi", # "mod_proxy", # "mod_simple_vhost", # "mod_evhost", # "mod_userdir", # "mod_cgi", # "mod_compress", # "mod_ssi", "mod_scgi", # "mod_usertrack", # "mod_expire", # "mod_secdownload", # "mod_rrdtool", "mod_accesslog" ) ## a static document-root, for virtual-hosting take look at the ## server.virtual-* options server.document-root = "C:/lighttpd/htdocs" ## where to send error-messages to server.errorlog = "C:/lighttpd/logs/lighttpd.error.log" # files to check for if .../ is requested index-file.names = ( "index.php", "index.html", "index.htm", "default.htm" ) # mimetype mapping mimetype.assign = ( ".pdf" => "application/pdf", ".sig" => "application/pgp-signature", ".spl" => "application/futuresplash", ".class" => "application/octet-stream", ".ps" => "application/postscript", ".torrent" => "application/x-bittorrent", ".dvi" => "application/x-dvi", ".gz" => "application/x-gzip", ".pac" => "application/x-ns-proxy-autoconfig", ".swf" => "application/x-shockwave-flash", ".tar.gz" => "application/x-tgz", ".tgz" => "application/x-tgz", ".tar" => "application/x-tar", ".zip" => "application/zip", ".mp3" => "audio/mpeg", ".m3u" => "audio/x-mpegurl", ".wma" => "audio/x-ms-wma", ".wax" => "audio/x-ms-wax", ".ogg" => "application/ogg", ".wav" => "audio/x-wav", ".gif" => "image/gif", ".jpg" => "image/jpeg", ".jpeg" => "image/jpeg", ".png" => "image/png", ".xbm" => "image/x-xbitmap", ".xpm" => "image/x-xpixmap", ".xwd" => "image/x-xwindowdump", ".css" => "text/css", ".html" => "text/html", ".htm" => "text/html", ".js" => "text/javascript", ".asc" => "text/plain", ".c" => "text/plain", ".cpp" => "text/plain", ".log" => "text/plain", ".conf" => "text/plain", ".text" => "text/plain", ".txt" => "text/plain", ".dtd" => "text/xml", ".xml" => "text/xml", ".mpeg" => "video/mpeg", ".mpg" => "video/mpeg", ".mov" => "video/quicktime", ".qt" => "video/quicktime", ".avi" => "video/x-msvideo", ".asf" => "video/x-ms-asf", ".asx" => "video/x-ms-asf", ".wmv" => "video/x-ms-wmv", ".bz2" => "application/x-bzip", ".tbz" => "application/x-bzip-compressed-tar", ".tar.bz2" => "application/x-bzip-compressed-tar" ) # Use the "Content-Type" extended attribute to obtain mime type if possible #mimetype.use-xattr = "enable" ## send a different Server: header ## be nice and keep it at lighttpd server.tag = "lighttpd/1.4.9a (Win32)" #### accesslog module accesslog.filename = "C:/lighttpd/logs/access.log" ## deny access the file-extensions # # ~ is for backupfiles from vi, emacs, joe, ... # .inc is often used for code includes which should in general not be part # of the document-root url.access-deny = ( "~", ".inc" ) $HTTP["url"] =~ "\.pdf$" { server.range-requests = "disable" } ## # which extensions should not be handle via static-file transfer # # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) ######### Options that are good to be but not neccesary to be changed ####### ## bind to port (default: 80) server.port = 3000 ## bind to localhost (default: all interfaces) server.bind = "127.0.0.1" ## error-handler for status 404 #server.error-handler-404 = "/error-handler.html" #server.error-handler-404 = "/error-handler.php" ## to help the rc.scripts #server.pid-file = "/var/run/lighttpd.pid" ###### virtual hosts ## ## If you want name-based virtual hosting add the next three settings and load ## mod_simple_vhost ## ## document-root ## virtual-server-root + virtual-server-default-host + virtual-server-docroot ## or ## virtual-server-root + http-host + virtual-server-docroot ## #simple-vhost.server-root = "/home/weigon/wwwroot/servers/" #simple-vhost.default-host = "grisu.home.kneschke.de" #simple-vhost.document-root = "/pages/" ## ## Format: <errorfile-prefix><status-code>.html ## -> ..../status-404.html for ''File not found'' #server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-" ## virtual directory listings #dir-listing.activate = "enable" -- Posted via http://www.ruby-forum.com/.
OK I can see why you''re struggling now, you didnt setup Lighttpd to send the request to the SCGI rail runner, have a look at this: http://www.zedshaw.com/projects/scgi_rails/lighttpd.html This will explain how to configure Lighttpd to send request to Rails via SCGI. Choosen extract: Make sure you have mod_scgi mentioned in the modules: server.modules = ( "mod_rewrite", "mod_redirect", "mod_access", "mod_accesslog", "mod_compress", "mod_scgi" ) Tell lighttpd to route 404 errors to your SCGI server with this stupidity: server.error-handler-404 = "/dispatch.scgi" Next you have to tell lighttpd to route all requests for dispatch.scgi to SCGI and not to check for local. scgi.server = ( "dispatch.scgi" => (( "host" => "127.0.0.1", "port" => 9999, "check-local" => "disable" )) ) On 05/04/06, charl <charl.souma@gmail.com> wrote:> Gael Pourriel wrote: > > Can you post your lighttpd.conf files? > > > > No you cant restart gracefully on windows. > > here is half my conf file, the lower half is all commented, and i didn''t > want to waste space on the forum - i''ve stared at this file until it put > me to sleep hope it sheds some lighty
Gael Pourriel wrote:> OK I can see why you''re struggling now, you didnt setup Lighttpd to > send the request to the SCGI rail runner, have a look at this: > > http://www.zedshaw.com/projects/scgi_rails/lighttpd.html > > This will explain how to configure Lighttpd to send request to Rails via > SCGI. > > Choosen extract: > > Make sure you have mod_scgi mentioned in the modules: > > server.modules = ( "mod_rewrite", "mod_redirect", "mod_access", > "mod_accesslog", "mod_compress", "mod_scgi" ) > > Tell lighttpd to route 404 errors to your SCGI server with this > stupidity: > > server.error-handler-404 = "/dispatch.scgi" > > Next you have to tell lighttpd to route all requests for dispatch.scgi > to SCGI and not to check for local. >> scgi.server = ( "dispatch.scgi" => (( > "host" => "127.0.0.1", > "port" => 9999, > "check-local" => "disable" > )) )ok, i seen this bit of code before, but i don''t understand what it does, do i need to have a file called dispatch.scgi, i read some where that it is a virtual file, i was getting so many problems with scgi that i thought by removing some code i could identify the problem and i never put this back in again. so now with your advice i have updated my .conf, and it looks like i have some type of communication, and i have an error to prove it, which is great, at least i know something is working, Gael I don''t expect that you should try figure this out for me too, as you have been a pretty big help already, but if you could advise me what to check and where to look i''d appreciate it. the error is : see below => right at the bottom i see scgi_service mentioned so i assume it is communicating with rails. cool. strange that this is happening cos webrick worked(database and all) as i mentioned before. i assume i need to set mysql settings somewhere but i''m not sure where, my database is on R:\ and the database.yml file is the same one i use for webrick -- the good news is that i just got a basic ''render text'' to work in a ruby script. this is the best news, i can finally start putting things together, Gael if you could give me any more advice it would be great, i don''t think without your advice i would have made it without going insane, now that it''s working it seems very easy, i think i will get apache going now and leave some very clear instructions for newbiews like myself who are still to make this difficult step. my new problem: NameError in Message#index uninitialized constant Mysql RAILS_ROOT: ./config/.. Application Trace | Framework Trace | Full Trace c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:195:in `const_missing'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:35:in `mysql_connection'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection_without_query_cache='' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/query_cache.rb:54:in `connection='' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:106:in `retrieve_connection'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:in `connection'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:518:in `count_by_sql'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:511:in `count'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/pagination.rb:167:in `count_collection_for_pagination'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/pagination.rb:188:in `paginator_and_collection_for'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/pagination.rb:124:in `paginate'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/scaffolding.rb:101:in `list'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/scaffolding.rb:94:in `index'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in `perform_action_without_filters'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/filters.rb:332:in `perform_action_without_benchmark'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in `measure'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/rescue.rb:82:in `perform_action'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:369:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:369:in `process_without_session_management_support'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/session_management.rb:116:in `process'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in `dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:23:in `process_request'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:21:in `synchronize'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:21:in `process_request'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:291:in `read_header'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:253:in `handle_client'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:234:in `initialize'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:234:in `new'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:234:in `handle_client'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:188:in `listen'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:186:in `initialize'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:186:in `new'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:186:in `listen'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:412:in `run'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:61 c:/ruby/bin/scgi_service:18:in `load'' c:/ruby/bin/scgi_service:18 c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:195:in `const_missing'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:35:in `mysql_connection'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection_without_query_cache='' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/query_cache.rb:54:in `connection='' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:106:in `retrieve_connection'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:in `connection'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:518:in `count_by_sql'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:511:in `count'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/pagination.rb:167:in `count_collection_for_pagination'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/pagination.rb:188:in `paginator_and_collection_for'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/pagination.rb:124:in `paginate'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/scaffolding.rb:101:in `list'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/scaffolding.rb:94:in `index'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in `perform_action_without_filters'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/filters.rb:332:in `perform_action_without_benchmark'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in `measure'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/rescue.rb:82:in `perform_action'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:369:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:369:in `process_without_session_management_support'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/session_management.rb:116:in `process'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in `dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:23:in `process_request'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:21:in `synchronize'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:21:in `process_request'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:291:in `read_header'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:253:in `handle_client'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:234:in `initialize'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:234:in `new'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:234:in `handle_client'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:188:in `listen'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:186:in `initialize'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:186:in `new'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:186:in `listen'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:412:in `run'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:61 c:/ruby/bin/scgi_service:18:in `load'' c:/ruby/bin/scgi_service:18 c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:195:in `const_missing'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/mysql_adapter.rb:35:in `mysql_connection'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection_without_query_cache='' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/query_cache.rb:54:in `connection='' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:106:in `retrieve_connection'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:20:in `connection'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:518:in `count_by_sql'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/base.rb:511:in `count'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/pagination.rb:167:in `count_collection_for_pagination'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/pagination.rb:188:in `paginator_and_collection_for'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/pagination.rb:124:in `paginate'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/scaffolding.rb:101:in `list'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/scaffolding.rb:94:in `index'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in `perform_action_without_filters'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/filters.rb:332:in `perform_action_without_benchmark'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in `measure'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/rescue.rb:82:in `perform_action'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:369:in `send'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:369:in `process_without_session_management_support'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/session_management.rb:116:in `process'' c:/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in `dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:23:in `process_request'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:21:in `synchronize'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:21:in `process_request'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:291:in `read_header'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:253:in `handle_client'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:234:in `initialize'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:234:in `new'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:234:in `handle_client'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:188:in `listen'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:186:in `initialize'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:186:in `new'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:186:in `listen'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/lib/scgi.rb:412:in `run'' c:/ruby/lib/ruby/gems/1.8/gems/scgi_rails-0.4.3/bin/scgi_service:61 c:/ruby/bin/scgi_service:18:in `load'' c:/ruby/bin/scgi_service:18 -- Posted via http://www.ruby-forum.com/.
Hi Charl, I''m not sure I can help anymore, If you followed exactly Zed instruction on his web site and it still doesn''t work and I dont know what else you can try. I''ve never tried SCGI on Lighttpd so I cant really tell you if there''s any gotchas...Sorry Gael On 05/04/06, charl <charl.souma@gmail.com> wrote:> Gael Pourriel wrote: > > OK I can see why you''re struggling now, you didnt setup Lighttpd to > > send the request to the SCGI rail runner, have a look at this: > > > > http://www.zedshaw.com/projects/scgi_rails/lighttpd.html > > > > This will explain how to configure Lighttpd to send request to Rails via > > SCGI. > > > > Choosen extract: > > > > Make sure you have mod_scgi mentioned in the modules: > > > > server.modules = ( "mod_rewrite", "mod_redirect", "mod_access", > > "mod_accesslog", "mod_compress", "mod_scgi" ) > > > > Tell lighttpd to route 404 errors to your SCGI server with this > > stupidity: > > > > server.error-handler-404 = "/dispatch.scgi" > > > > Next you have to tell lighttpd to route all requests for dispatch.scgi > > to SCGI and not to check for local. > > > > > > scgi.server = ( "dispatch.scgi" => (( > > "host" => "127.0.0.1", > > "port" => 9999, > > "check-local" => "disable" > > )) ) > > > ok, i seen this bit of code before, but i don''t understand what it does, > do i need to have a file called dispatch.scgi, i read some where that it > is a virtual file, i was getting so many problems with scgi that i > thought by removing some code i could identify the problem and i never > put this back in again. so now with your advice i have updated my .conf, > and it looks like i have some type of communication, and i have an error > to prove it, which is great, at least i know something is working, Gael > I don''t expect that you should try figure this out for me too, as you > have been a pretty big help already, but if you could advise me what to > check and where to look i''d appreciate it. > > the error is : see below => right at the bottom i see scgi_service > mentioned so i assume it is communicating with rails. cool. strange that > this is happening cos webrick worked(database and all) as i mentioned > before. i assume i need to set mysql settings somewhere but i''m not sure > where, my database is on R:\ and the database.yml file is the same one i > use for webrick -- the good news is that i just got a basic ''render > text'' to work in a ruby script. this is the best news, i can finally > start putting things together, Gael if you could give me any more advice > it would be great, i don''t think without your advice i would have made > it without going insane, now that it''s working it seems very easy, i > think i will get apache going now and leave some very clear instructions > for newbiews like myself who are still to make this difficult step. my > new problem: >
Gael Pourriel wrote:> Hi Charl, I''m not sure I can help anymore, If you followed exactly Zed > instruction on his web site and it still doesn''t work and I dont know > what else you can try. I''ve never tried SCGI on Lighttpd so I cant > really tell you if there''s any gotchas...Sorry > > GaelGael you''ve gotten me this far, thanks for your time. I will persist, as i''m so close now, at least i''ve got a script running, i just need to keep on trying. -- Posted via http://www.ruby-forum.com/.