Re: [Mongrel] problem starting mongrel in windows
Thanks, Luis, for making me see that. Indeed I was using jruby's gems to install all the applications. When I installed anything using the gem command, it was the gem under the jruby folder that was being executed. I had to changed the precedence of the entries of jruby and ruby in the path(environment variable) and do all the installs again and mongrel runs smooth. great!!! -- From: "Luis Lavena" <[EMAIL PROTECTED]> Sent: Saturday, September 06, 2008 3:08 PM To: Subject: Re: [Mongrel] problem starting mongrel in windows On Fri, Sep 5, 2008 at 7:56 PM, suman gurung(hotmail) <[EMAIL PROTECTED]> wrote: Hi everybody, I was trying to get rails applications deployed in my pc(windows vista), and I had some problem trying to start mongrel web server, and I have no clue as to how and why it is not working. I have installed ruby, rubygems, rails, mysql and mongrel, the last three as rubygems. I could run the 'rails' command to and create an application with the folder structure and all. But when I tried to start the mongrel, I get the following error message. F:\ROR\sources\hello>mongrel_rails start -d C:/ruby/jruby-1.1.3/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require': no such file to load -- win32/service (LoadError) from C:/ruby/jruby-1.1.3/lib/ruby/site_ruby/1.8/rubygems/custom_require. rb:27:in `require' from C:/ruby/jruby-1.1.3/lib/ruby/gems/1.8/gems/mongrel_service-0.1/lib/mongrel_service/init.rb:5 from C:/ruby/jruby-1.1.3/lib/ruby/gems/1.8/gems/mongrel_service-0.1/lib/mongrel_service/init.rb:27:in `require' To keep it short: You're using JRuby, not Matz Ruby (MRI) so: mongrel_service gem will not work, since it depends on win32-service, which is only Windows (not Java). You're using a old version of mongrel_service (0.1) which definitely will not work as expected with latest Rails and Mongrel. Daemonize (-d) otpion requires fork functionality, which is not available in Windows (neither MRI or JRuby or any Ruby for Windows implementation). Also, is there any way to keep mongrel live and running?? I tried to install it as a service as mentioned in the website with the following command: gem install mongrel_service and it mentioned that 1 gem was installed, but I don't see any service with the name "mongrel" or "mongrel_rails" running in the list of services. I am new with mongrel so please do help me. mongrel_rails service::install --help That is clearly documented in mongrel site: http://mongrel.rubyforge.org/wiki/Win32 -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] speed curiosity
> Yeah I guess the best thing'd be to fix IO#write in the core, instead > of a hack to work around it :) I have no idea what #write does but > it appears that it is suboptimal, at least for this one distro on > this one machine. I do not think so, IO#write writes "exactly" n bytes even if the operating systems socket buffer infrastructure (and ruby's one) cannot handle "exactly" n bytes with optimal efficiency. It maybe force sending fragmented packages, do costly buffer expansion or other time consuming operations. IO#writepartial let the os (and ruby?) write the "optimal" amount of data in the current buffer and socket environment. Maybe the usage of the select (ruby) system call Kernel#select can be used to write to the socket "only if it would not block and or do other costly operations" - see above. Ruby 1.8 (maybe 1.9 too?) internally useing the select system call, to manage threading. Year's ago i tried to improve the throughput using select, unfortunately ruby 1.8 did not merge "my select call" in it's internal select calls. strace showed various "internal selects" and "my io selects" in unpredictable order, interrupting each other (ruby's thread scheduler timer?)... It was not he perfect solution ;) Maybe situation has changed? Mfg Markus ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] problem starting mongrel in windows
On Fri, Sep 5, 2008 at 7:56 PM, suman gurung(hotmail) <[EMAIL PROTECTED]> wrote: > Hi everybody, > I was trying to get rails applications deployed in my pc(windows vista), and > I had some problem trying to start mongrel web server, and I have no clue as > to how and why it is not working. > I have installed ruby, rubygems, rails, mysql and mongrel, the last three as > rubygems. I could run the 'rails' command to and create an application with > the folder structure and all. But when I tried to start the mongrel, I get > the following error message. > > F:\ROR\sources\hello>mongrel_rails start -d > C:/ruby/jruby-1.1.3/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in > `require': no such file to load -- win32/service (LoadError) > from > C:/ruby/jruby-1.1.3/lib/ruby/site_ruby/1.8/rubygems/custom_require. > rb:27:in `require' > from > C:/ruby/jruby-1.1.3/lib/ruby/gems/1.8/gems/mongrel_service-0.1/lib/mongrel_service/init.rb:5 > from > C:/ruby/jruby-1.1.3/lib/ruby/gems/1.8/gems/mongrel_service-0.1/lib/mongrel_service/init.rb:27:in > `require' To keep it short: You're using JRuby, not Matz Ruby (MRI) so: mongrel_service gem will not work, since it depends on win32-service, which is only Windows (not Java). You're using a old version of mongrel_service (0.1) which definitely will not work as expected with latest Rails and Mongrel. Daemonize (-d) otpion requires fork functionality, which is not available in Windows (neither MRI or JRuby or any Ruby for Windows implementation). > > > Also, is there any way to keep mongrel live and running?? I tried to install > it as a service as mentioned in the website with the following command: gem > install mongrel_service and it mentioned that 1 gem was installed, but I > don't see any service with the name "mongrel" or "mongrel_rails" running in > the list of services. I am new with mongrel so please do help me. > mongrel_rails service::install --help That is clearly documented in mongrel site: http://mongrel.rubyforge.org/wiki/Win32 -- Luis Lavena AREA 17 - Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. Douglas Adams ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] speed curiosity
Wayne Seguin wrote: > Using write_nonblock is an absolutely great suggestion; the only real > issue with write_nonblock is that it doesn't work in all environments. > While Ruby is supposed to fall back on blocking IO when async is > unavailable in the underlying system the reality is sketchy at best. Yeah I guess the best thing'd be to fix IO#write in the core, instead of a hack to work around it :) I have no idea what #write does but it appears that it is suboptimal, at least for this one distro on this one machine. Maybe I should just file a ruby bug report that says "IO#write seems slow!" :) Unfortunately it seems that on 1.9 it has the same speed pattern, so no help there. Thanks for your help. -=R >> approx. the same results, which I did thanks to your suggestion. >> 70K response: old: 366 req/s new: 1140 req/s (thin: 1160) >> -=R -- Posted via http://www.ruby-forum.com/. ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users