Re: [Mongrel] cannot load such file -- 1.9/http11
On Fri, Nov 2, 2012 at 5:21 PM, Roelof Wobben rwob...@hotmail.com wrote: Hello, I have installed the mongrel 1.2.0-pre2 gem into my project. But when I do rake db:test:prepare I see this output : http://yourbugreportneedsmore.info/ You don't say what version of Ruby, Rails and OS are you using. cannot load such file -- 1.9/http11 Anyone a idea how to solve this ? While mongrel might work under Ruby 1.9, I'm not sure it will properly work due the changes in threads. Not to mention newer versions of Rails. I personally you move a rack-based web server, like Puma: http://puma.io/ Which uses the same parser from Mongrel and follows a similar philosofy. Cheers, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] cannot load such file -- 1.9/http11
On Fri, Nov 2, 2012 at 5:56 PM, Roelof Wobben rwob...@hotmail.com wrote: One question : can Puma work together with Cucumber ? The two are completely unrelated. One is a web server while the other is a testing/acceptance framework. I presume you want to test with cucumber your application, right? Cucumber will use Rack to connect to your application and test your controllers/stuff. (search the web if you don't know what is it) -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] £ symbol and Mongrel
On Mon, Jul 2, 2012 at 10:15 AM, Peter Eaves li...@ruby-forum.com wrote: Hi, I have an application which had been developed and deployed with the following: *** LOCAL GEMS *** mongrel (1.2.0.pre2) mongrel_service (0.4.0) rails (2.3.5) The one issue which has appeared is that when running with mongrel_services any £ (pound signs) located in text field on the database are not being shown in the browser, I get a little square instead. If I close the mongrel_services down and revert to launching with ruby script/server the £ (pound signs) show correctly. Can anyone offer any advise of suggestions? The problem seems to be encoding, not mongrel. Remember that the application is run as service is not running with the same privileges as script/server in the console. Have you tried mongrel start in the console instead and see if that have the same issue? If so, then loading mongrel (through mongrel_service) is the problem, and if not, the issue might be associated as the first thing I mentioned. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel service
Yes, still correct. Sent from mobile. On Mar 23, 2011 4:57 AM, Anita G. li...@ruby-forum.com wrote: Luis Lavena wrote in post #943008: Basically, it seems that there just isn't any way at all of running mongrel as a service with Rails 3. Could you confirm this? Correct. Noone has worked on fix that. -- Luis Lavena Is this still correct? thanks, Anita -- Posted via http://www.ruby-forum.com/. ___ 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] mongrel/mongrel_rails windows question
On Fri, Feb 25, 2011 at 7:23 PM, Russ Erickson li...@ruby-forum.com wrote: Hello! Hello Russ! Sorry for the long delay in the reply. I'm just wondering if anyone has any recommendations for running mongrel/mongrel_service under Windows (Client requires Windows Server 2008, SQL Server 2008, IIS7, no budget for a *nix box of any kind). I have a working setup, but wondering if anyone has any further insight. Current working setup: Ruby 1.87 (via rubyinstaller.org) Rail 2.3.11 mongrel 1.1.15 (mingw32) mongrel_service 0.4.0 With the requirement of using Rails 2.3.11 or even going to Rails 3, I will recommend avoid mongrel in this case. There are some reports of multiple cookies issues that haven't been addressed due the inability to reproduce them or provide concrete test cases. I've suggested someone port mongrel_service to provide the same support for Thin, which could be pretty trivial, but noone stepped up. With that you should be able to setup multiple services in different ports and then make the service dependent on IIS or TCPIP service so the automatic startup do not affect. Another point, completely unrelated to mongrel and mongrel_service is ensure your server have Ruby executable in the DEP exclude list. More details at this entry of RubyInstaller troubleshooting: https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#dep_segfault I'll be looking at using the ARR features of IIS7 to do some load balancing between a few instances of mongrel running on different ports on the same box. Sounds good, I've done the same approach in the past. I have read a lot of posts from people discussing troubles in getting Ruby 1.92 for windows working with mongrel 1.1.20pre and mongrel_service. Does anyone have a working setup of this and is it worth fighting for? 1.9.2 has some startup performance issues on Windows. starting a Rails application can take way longer than 1.8.7, but then request performance on production mode is good and pretty much up-par Linux in this area. But, mongrel 1.2.0.pre is another story. I've mentioned the cookie issue above, which could be problematic. Again, sorry for the long delay in my reply and hope these answers help you out. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel service
On Tue, Feb 1, 2011 at 4:22 PM, Edison Ting li...@ruby-forum.com wrote: My question is are we suppose to see a pid file in windows? and pid files are not created on Windows. how are we allow the service to run multiple port like -p 3000+3 ? You need to create multiple services at different ports. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel service
On Tue, Feb 1, 2011 at 5:35 PM, Edison Ting li...@ruby-forum.com wrote: My next questions is instead of creating multiple services, is there an option to allow one service run multiple ports. Something like creating a script file trigger all the ports when one service start? What is the best practice? Thanks!! =) No, right now there isn't. mongrel_service was designed behind that goal, but the code that powers that part is missing. (single mode is the only mode available in the current codebase) -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel service keeps re-starting ruby
On Mon, Dec 13, 2010 at 8:24 AM, Sebastien Perret li...@ruby-forum.com wrote: Hi All, I have exactly the same problem : mongrel keeps restarting the ruby process. I have installed the patch_for_mongrel.rb proposed by Jonathan. I have ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-mingw32] My version of Gem is 1.3.7. Here is the result of my command : U:\mongrel_rails start -e production -p 3001 -a 10.0.5.201 -l mongrel.log -P mongrel.pid -c D:/wamp/www/redmine -t 0 -r public -n 1024 ** Starting Mongrel listening at 10.0.5.201:3001 ** Starting Rails with production environment... D:/wamp/www/redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be remo ved on or after August 2010. Use #requirement d:/Ruby187/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 74, col 21: ` authentication: : login' (ArgumentError) from d:/Ruby187/lib/ruby/1.8/yaml.rb:133:in `load' Any Idea ? Yes, please read the exception: syntax error on line 74, ... that is reading a YAML file, check there is no tab or incorrect indentation in that file. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel service keeps re-starting ruby
On Mon, Dec 13, 2010 at 10:20 AM, Sebastien Perret li...@ruby-forum.com wrote: I have checked the .yml file. See attached to my post. The error refers to a comment line. Nothing before the line 74 looks wrong. No tabulation reached. You attached the ruby file from YAML, but if you look at the reference in the output: `load': syntax error on line 74, col 21: `authentication: : login' You have a YAML file that contains a : login that is not a symbol. There should not be spaces for symbols. Please check your yaml files, not the YAML parser. I have moved the yml file and install again ruby with the installer.exe. The old yml file and the new one matches, no différence found. Pretty strange ... This has nothing to do with the YAML parser or Ruby, is one of your configuration files. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel service keeps re-starting ruby
On Mon, Dec 13, 2010 at 10:30 AM, Sebastien Perret li...@ruby-forum.com wrote: Sorry, I have found many tabulation in this file replaced them with space caracter but the problem remained. Can you pastie the file that contains the authentication line I mentioned before? There must be a syntax error there you're not seeing. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] ERROR: Failed to build gem native extension.
On Thu, Dec 2, 2010 at 9:48 PM, Luis Flores luis.fernando.flores.ovi...@gmail.com wrote: Hello, I am currently not able to instal mongrel, I run a Linux Ubuntu 10.04 system with Gems 1.3.7 when I do a sudo gem install mongrel I get this sequence of messages: [SNIP] $ sudo gem install mongrel gcc -I. -I/usr/local/include/ruby-1.9.1/i686-linux -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long -o http11.o -c http11.c /usr/local/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5/ext/http11/gem_make.out Would you please help me? Mongrel 1.1.5 is not compatible with Ruby 1.9.x You need to install the pre-release version: gem install mongrel --pre -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
[Mongrel] [ANN] mongrel_service 0.4.0 Released
mongrel_service version 0.4.0 has been released! * http://github.com/luislavena/mongrel_service This plugin offer native win32 services for rails. This replace mongrel_rails_service. Changes: ### 0.4.0 / 2010-11-16 * Enhancements: * Pass-through arguments during service install. Closes GH-4 * A bit more verbose messages at install / removal * Bugfixes: * Quote service name. Closes GH-3 * Loose mongrel dependency a little bit for compatibility * Service name is mandatory. Closes GH-10 As reference, the following was covered on previous beta releases: === 0.4.beta3 / 2010-03-07 * Bugfixes: * Enable the service display name to contain spaces [sinclair] * Use a regex for more realible determination of service existance [sinclair] Closes GH-1 === 0.4.beta2 / 2010-01-01 * Enhancements: * Removed win32-service dependency, making mongrel_service more portable between Ruby implementations on Windows (One-Click and RubyInstaller) * Now mongrel log files are written to the path specified by --log option. Contribution by Daniel Gies (BigFix). Closes #44. * Bugfixes: * Wait longer for child process terminate properly (max 20 seconds). Imported tests from RubyServices project. Closes #18. * Workaround Windows 2008 process detection issues forcing 'service' initialization parameter. Closes #54. [papillon] * Updated ServiceFB to work with FB 0.18. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] mongrel_service gem for Ruby 1.9.1
On Sun, Nov 7, 2010 at 7:47 AM, Srinivasan Anand mail2san...@gmail.com wrote: Hi Luis, Hello, I'm forwarding this to mongrel-users list as others will benefit from the responses. Greetings. This is regarding the mongrel_service gem related to the Ruby 1.9.x versions. As suggested in some blog, I have tried integrating the Daemon class(as attached) from Win32Utils gems but I feel, it all depends on Ruby 1.8.x versions coz I getting a msvcrt-ruby18.dll not found error. Can you provide a link to that blog? mongrel_service do not use win32-service or the daemon class since version 0.2 or something. It instead have an executable that mimics a service and communicate with the ruby child process. Now, win32-service gem is binary linked against Ruby 1.8, you will need to force the installation of the ruby version: gem install win32-service --platform=ruby But for that to work, you will also need to have RubyInstaller DevKit installed: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit I had to develop an application with Ruby - 1.9 and the corresponding rails - 2.3.5 and co, unfortunately in the Windows environment. Now, if I shift the Ruby version to 1.8.7(where I can use the mongrel_service gems for daemonizing the application), I may need to change a whole lot of code, which I would like to take it as the last option. Please do suggest me any other way we can do this. The ruby version and the gem list I am using is as below: Please also install mongrel_service pre-release version too: https://rubygems.org/gems/mongrel_service/versions/0.4.beta3 gem install mongrel_service --pre mongrel_service do not depend on win32-service anymore v...@vaio-pc /g/Aptana_Workspace/sssmh $ ruby -v ruby 1.9.1p430 (2010-08-16 revision 28998) [i386-mingw32] v...@vaio-pc /g/Aptana_Workspace/sssmh $ gem list *** LOCAL GEMS *** actionmailer (2.3.5) actionpack (2.3.5) activerecord (2.3.5) activeresource (2.3.5) activesupport (2.3.8, 2.3.5) cgi_multipart_eof_fix (2.5.0) daemons (1.1.0) eventmachine (0.12.10) exception_string (0.1.2) fastthread (1.0.7) gem_plugin (0.2.3) mongrel (1.2.0.pre2 x86-mingw32) mysql (2.8.1 x86-mingw32) paperclip (2.3.3) rack (1.0.1) rails (2.3.5) rake (0.8.7) rdiscount (1.6.5) rubyw_helper (0.1.5) thin (1.2.7) win32-api (1.4.6) win32-service (0.7.1 x86-mswin32-60) windows-api (0.4.0) windows-pr (1.0.9) Please do guide me. Sairam and Regards, S. Anand HTH, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Problem related to Caching in mongrel
On Fri, Oct 22, 2010 at 9:17 AM, Saratchand Kanuri li...@ruby-forum.com wrote: My production server has 6 mongrels running. I hosted a CMS (content management system) on the server. As a admin of the website, I delete few tabs in the site. But the Public version(for the non-loggedin) version of the site still shows the deleted tabs at random(some times they show up and sometimes don't). I suppose that the cache at some of the mongrels is not updated properly and that is why I can see the deleted tabs. Is my supposition correct. Or am I missing something? Can someone help me out. I am blocked on this right now. Some questions: - What software is your CMS? Radiant? other? - What caching strategy is setup in your Rails/CMS application? The one by default? Asking this because Rails MemoryStore, the default caching strategy only works for a single process. Multiple process requires a shared memory caching strategy, like memcache -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] [Ruby Forum] Message from user amit-singh
On Wed, Sep 22, 2010 at 6:13 AM, amittome...@yahoo.com wrote: amit-singh sent you the following message: Sorry to send you personal message but its urgent... Please, really, do not email me directly, I can't answer all the questions that are emailed daily. hii all, am using apache as frontend to mongrel and loaded xsendfile module in apache ,am looking for 1 GB of download .this is download routine def download @stream = Stream.find(params[:id]) send_file(@stream.location,:filename = @stream.name,:disposition 'attachment',:x_sendfile = true ) and And this is how it is processed Sending X-Sendfile header d:/dm/predator_720x480_5mbps_30fps_17minclip.264.filepart Completed in 57513ms (View: 0, DB: 15) | 200 OK [http://src/streams/download/6596] It is clear that for the time it took to complete the request 57 seconds is way to much time to the request actually been delivered by X-Sendfile headers and not by Rails. very first times its okk i getting full 1.1 GB of file getting downloaded,but when i am trying to download this 1.1 gb of file again, am getting failed to allocate memroy what could be soultion?? and can i use cache.clear before send_file function?? Do you understand that? Rails is serving the request, the 1.1GB, not Apache. That is why is failing. and more thing to again download 1.1 gb of file i have to restart my servers.. and one more thing i noticed while downloading file my c driver memory geeting decrease...where file being stored in c drive while downloading thanks?? Dunno about that, but it is clear that the file is not being streamed by Apache. First: 1) I assume you have mongrel behind apache as reverse-proxy 2) static files are being served by Apache and not send to mongrel 3) You can check apache logs to verify that the request is actually setting the headers. 4) Is D:/ directory available to Apache? is a mapped network drive? 5) Can you check tasklist or Windows Task Manager to determine which process is the one eating the memory? Apache or Mongrel 6) When reporting a problem, try to include the more version information as possible, like apache version, Ruby version etc. And again, as mentioned before, search the web first and try to determine if the problem is you (and the way you do things) or the tools you're using by separating and analyzing each individual part of your setup. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel service
On Wed, Sep 22, 2010 at 9:33 AM, Gerhard Koekemoer gerha...@prodispace.co.za wrote: Hi all Environment: Windows 7 64 bit Ruby 1.9.2.p0 Rails 3 I am getting the following error when I run the following command mongrel_rails service::install -N MyTestApp_4001 -p 4001 –e production: “Msvcrt-ruby18.dll is missing” You're attempting to run Ruby 1.9 with a version of mongrel that hasn't been compiled with Ruby 1.9 support. Please install the 1.2.0 prerelease version: gem install mongrel --pre Also note that mongrel_rails start will fail with Rails 3. Which means mongrel service will also fail. Before you report that back, see existing issues in relation to Rails 3: http://github.com/fauna/mongrel/issues -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] problem in downloading large file with apache+mongrel
On Wed, Sep 22, 2010 at 10:01 AM, Amit Tomar li...@ruby-forum.com wrote: hii all, am using apache as frontend to mongrel and loaded xsendfile module in apache ,am looking for 1 GB of download .this is download routine Replied your previous message to the list also. Please provide the answers to my questions. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] problem in downloading large file with apache+mongrel
On Wed, Sep 22, 2010 at 10:50 AM, Amit Tomar li...@ruby-forum.com wrote: just now i seen your message... i am running apache 2.2.11 that comes with XAMPP 1.7.1 and mongrel version is 1.1.2, ruby version is ruby 1.8.6 Rails is serving the request, the 1.1GB, not Apache but how do i know rails is serving the request..or Apache Please answer all the questions I put, analyze the process memory usage. If you don't see in apache serving the X-Sendfile request, then is not. Try setting the headers on your own and render nothing: Implement the first code example of this page: http://john.guen.in/past/2007/4/17/send_files_faster_with_xsendfile/ Not the plugin. 2. d:/dm is not a network drive..its folder on d drive how do i know whther it available to apache ?? Try to setup a virtual server configuration that access D: and see if it works. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel service
On Wed, Sep 22, 2010 at 11:12 AM, Gerhard Koekemoer gerha...@prodispace.co.za wrote: Hi Luis I have now switched over to Ruby 1.8.7 and Mongrel 1.1.5 and Mongrel Service 0.4.3.beta3 just to make sure these gems are compatible with each other. Running the mongrel_rails start command: mongrel_rails is not recognized as an internal or external command, is this the error you spoke about? No. Is Ruby in your PATH? Basically, it seems that there just isn't any way at all of running mongrel as a service with Rails 3. Could you confirm this? Correct. Noone has worked on fix that. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] problem in downloading large file with apache+mongrel
On Wed, Sep 22, 2010 at 12:01 PM, Amit Tomar li...@ruby-forum.com wrote: Processing StreamsController#download (for 127.0.0.1 at 2010-09-22 20:22:06) [GET] Parameters: {id=6600} ?[4;36;1mSQL (0.0ms)?[0m ?[0;1mSET NAMES 'utf8'?[0m ?[4;35;1mSQL (0.0ms)?[0m ?[0mSET SQL_AUTO_IS_NULL=0?[0m ?[4;36;1mStream Columns (0.0ms)?[0m ?[0;1mSHOW FIELDS FROM `streams`?[0m ?[4;35;1mStream Load (0.0ms)?[0m ?[0mSELECT * FROM `streams` WHERE (`streams`.`id` = 6600) ?[0m ?[4;36;1mCACHE (0.0ms)?[0m ?[0;1mSELECT * FROM `streams` WHERE (`streams`.`id` = 6600) ?[0m 0) ?[0m Completed in 65347ms (View: 0, DB: 0) | 200 OK [http://src/streams/download/6600] Rails log do not help, we need to know Apache headers, responses and also mongrel headers sent to apache via the proxy. Please use curl --head on mongrel to request the URL and provide the complete output Also do the same from apache. Beyond that, I cannot help you more because I don't have time to attempt replicate your environment and scenario. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] problem in downloading large file with apache+mongrel
On Wed, Sep 22, 2010 at 12:29 PM, Amit Tomar li...@ruby-forum.com wrote: Amit Tomar wrote: yaa am looking to provide answer for that also memory usage Luis when i download file httpd.exe is varied from at 49,892k to 50,264k while ruby.exe 934800 k to 1,208688k That makes then clear that Ruby is trying to read the file, not apache. Sorry, I can't help you more if you don't keep an structure conversation and you investigate also. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] failed to allocate memory while downloading large files
On Tue, Sep 14, 2010 at 9:21 AM, Amit Tomar li...@ruby-forum.com wrote: thanks luis but could you please explain how i serve it directly Place the file inside public, provide the URL to the file as a link, your browser will start download once the file is served. send_data is not recommended for big file serving. and for my application i can'nt use IE because as you said it don't do chunked upload. Can't help you on that, please research about it. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] failed to allocate memory while downloading large files
On Tue, Sep 14, 2010 at 2:49 AM, Amit Tomar li...@ruby-forum.com wrote: Luis ,this is how am downloading my files send_data(@data,:filename = @containerformat.name+extension, :disposition = 'attachment') but i am getting error failed to allocate memory for large files ,for small files it's working fine Because send_data will try to load the whole file in memory. http://apidock.com/rails/ActionController/Streaming/send_data Since the file is not dynamically generated, serve it directly, don't put it behind Rails. and one thing more i observed while uploading large files , whenever i upload data more than 2gb from IE OR from mozila ,both restarts but for google chorme its working fine??? Neither IE or Mozilla do chunked uploads. Chrome does and mongrels properly streams the chunked upload to a temporary file. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] failed to allocate memory while downloading large files
On Tue, Sep 14, 2010 at 9:39 AM, Amit Tomar li...@ruby-forum.com wrote: sorry luis but i didn't get you i uploaded my file in filesystem than how can i place file in public folder could you please give some example?? Are you using a plugin to manage your uploads? How are you saving the file? Take the temporary file and use File.move or FileUtils.mv, wonder what are you doing right now for that. Please use google to search, there are plenty of file uploading tutorials about Ruby on Rails on the internet covering do from scratch or using gem/plugins. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] failed to allocate memory while downloading large files
On Tue, Sep 14, 2010 at 9:50 AM, Amit Tomar li...@ruby-forum.com wrote: this is how am uploading def upload(params) path = get_path(params) File.open(path, wb) do |f| while buff= params[:location].read(4096) f.write(buff) end end end That is copying the file every 4k for you, you can simply File.move form the temporay filename to the final name in your remote location. It is expected you dispose the temporary file when you're done with it. Please see how proper file uploading and processing is done with Ruby on Rails. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] mongrel_service on Windows Server 2008 R2 /w Run As User
On Mon, Sep 13, 2010 at 6:14 AM, Ralf Vitasek neong...@gmail.com wrote: if i'd knew what. mongrel starts fine when started on the command line with the same use. Please open a GitHub issue for better documentation, I promise will tackle it :) http://github.com/fauna/mongrel_service/issues Now.. servicefb.log: _initialize() constructor _initialize() constructor done ServiceProcess(new_name) ServiceProcess(new_name) done ServiceHost() ServiceHost() done ServiceHost.Add() _add_to_references() _add_to_references() done ServiceHost.Add() done ServiceController.RunMode() CurrentPID: 1688 ParentPID: 624 Error with OpenProcess GetLastError: 0Der Vorgang wurde erfolgreich beendet. It is clear that is having problems opening the process. Can you try out the newer beta? gem install mongrel_service --pre And then try to remove and register with the new service. On the new beta we handle much better parent process detection (or at least try to be less smart). -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] failed to allocate memory while downloading large files
On Mon, Sep 13, 2010 at 7:33 AM, Amit Tomar li...@ruby-forum.com wrote: hii , I uploaded 1 GB of file to filesystem,but now when i trying to download this 1 GB of file ,i am getting failed to allocate memory. am running mongrel as server in development mode. NoMemoryError (failed to allocate memory): C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/cache.rb:60:in `' C:/InstantRails-2.0-win/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/cache.rb:60:in `expand_cache_key' This has nothing to do with Mongrel. From the backtrace it seems you're trying to cache all the file contents in memory. What is the code you're using to serve the file? Mongrel is quite capable to serve any file from public folder without any Rails code interfering it. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] mongrel_service on Windows Server 2008 R2 /w Run As User
On Mon, Sep 6, 2010 at 11:47 AM, Ralf Vitasek neong...@gmail.com wrote: Hello! I need to run an older Rails App on WIndows Server 2008 R2 with a different Account then the default Local System. While the default works, when trying to start with a different User (even tried with a Domain Admin account), the service will not start (Error 1053). That problem doesn't occur with Windows Server 2003. Any idea what is required to get it to start with a different user on Windows Server 2008 R2 ? Can you provide more information about what fails to get executed? Does that user have access to Ruby and the installed gems? The database or the directories where the application is installed? What are the contents of the log files? mongrel_service.log and fbservice.log. a simple test will involve using psexec to mimic the user environment you're talking and launch mongrel_rails from the command line with the same parameters you installed it. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] file access with mongrel running as windows service
On Fri, Aug 20, 2010 at 10:31 AM, Amit Tomar li...@ruby-forum.com wrote: Luis I tried to upload a file of size 324mb but something strange happened i'm able to upload the file but still i'm getting error Invalid argument - //192.122.227.53/Smar/streams2/D1_monsters_3_720x480_422i_SP_5Mbps_30fps_657frames.yuv but when i checked the location(//192.122.227.53/Smar/streams2) file was there what could be the reason ?? I have no idea where are you receiving the 'invalid argument' error. It is extrematelly important than when you report an error, provide enough details and precision about it, more precisely, the full error messages and backtraces. We can't replicate or provide you help if you skim it and provide vague information. Help us help you. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] [Ruby Forum] Message from user amit-singh
Hello, please don't send personal messages. Post to the list so everybody benefits from the answer. On Thu, Aug 19, 2010 at 11:36 AM, amittome...@yahoo.com wrote: amit-singh sent you the following message: have created a window service(rails website)using commnad like mongrel_rails service::install -N smar2 -p 3000 -a 192.168.247.49 -e production -c D:/work/Smar/src now a service named smar2 is created but when i try to run it i got an error message like service started and stopped it has nothing to do now i would like to know how do i configure smar2 in regedit and what values should i add in Application and Appparameters . plzzz help me Do your application work when running mongrel_rails start from the console? Have you check the contents of .log like mongrel_service and servicefb.log located in the Ruby bin directory? We need more details to help you out. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] file access with mongrel running as windows service
On Wed, Aug 18, 2010 at 9:47 AM, Amit Tomar li...@ruby-forum.com wrote: LUIS i am not getting error like Permission denied - //Z/:streams/al00_96000.aac what should i do and i am also running service as a particular user I'm having problems understanding your english. Mapped network drives do not start with //, they are normal network letters: C:\Users\Luisnet view Server NameRemark --- \\KEORE C:\Users\Luisnet view \\KEORE Shared resources at \\KEORE Share name Type Used as Comment --- Users Disk C:\Users\Luisnet use * \\KEORE\Users Drive Z: is now connected to \\KEORE\Users. The command completed successfully. C:\Users\Luisirb irb(main):001:0 require 'fileutils' = true irb(main):002:0 FileUtils.touch Z://foo.txt Errno::EACCES: Permission denied - Z://foo.txt from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1034:in `initialize' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1034:in `open' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1034:in `touch' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1028:in `each' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1028:in `touch' from (irb):2 It is clear I don't have permission to do that, but: irb(main):003:0 FileUtils.touch Z://Luis/foo.txt = [Z://Luis/foo.txt] I do. Also: irb(main):004:0 FileUtils.touch //Z://Luis/bar.txt Errno::ENOENT: No such file or directory - //Z://Luis/bar.txt from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1034:in `initialize' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1034:in `open' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1034:in `touch' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1028:in `each' from C:/Users/Luis/Tools/Ruby/ruby-1.8.7-p302-i386-mingw32/lib/ruby/1.8/fileutils.rb:1028:in `touch' from (irb):4 it is clear that // should not prepend the drive letter, but instead: irb(main):005:0 FileUtils.touch //KEORE/Users/Luis/bar.txt = [//KEORE/Users/Luis/bar.txt] I hope this explains a bit better what I'm talking about. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] file access with mongrel running as windows service
On Tue, Aug 17, 2010 at 10:54 AM, Amit Tomar li...@ruby-forum.com wrote: David could you explain it more i think i have same sort of problem what i am doing is. i created a web application using instant rails,i having rails 2.2.2,mysql database,mongrel running as a server, i used mysql database to store the different property of files and i am plcing actual file(phsical file) on samba server.now i run my it as application ,everthing is fine but soon i run my application as windows service i am getting this problem No such file or directory - Z:/streams/Texture.bmp Z: is drive letter here i am trying to upload Texture.bmp file to samba means to Z:/streams any help .. Unless you're running the mongrel service as the same user, the mapped network drives are not available. Either you use the full network path (\\SERVER\PATH) or you run the service as the user that defines the mapped network drives. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] file access with mongrel running as windows service
On Tue, Aug 17, 2010 at 11:08 AM, Amit Tomar li...@ruby-forum.com wrote: Luis i tried to set full network path but not successed and how do i run the service under the user that defines the mapped network drives. You will need to access the Services definition and under properties select Run as user. You will need to provide the password too. (all this under administrative tools, things may vary between windows versions). -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] http://github.com/mongrel/mongrel has outdated code /fauna/mongrel is more current
Please report that to mongrel/mongrel repository owner. Sent from mobile. On 9 Aug 2010 03:55, deepak kannan kannan.dee...@gmail.com wrote: hi, The link for homepage on: http://rubygems.org/gems/mongrel redirects to http://github.com/fauna/mongrel but we still have a http://github.com/mongrel/mongrel which has outdated code and has more downloads and has more watchers and forks :-) maybe a note on the mongrel repo pointing to the fauna repo would be appropriate cheers, deepak ___ 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] bug
On Tue, Jul 27, 2010 at 5:43 PM, Roger Pack li...@ruby-forum.com wrote: Perhaps it's old news, but appears there's a bug in mongrel: http://www.ruby-forum.com/topic/213853#928629 Just in case it's not old news. http://github.com/fauna/mongrel/issues/#issue/5 More than monkeypatching I would appreciate a real patch. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel(_rails) crashing with rails3
On Thu, Apr 29, 2010 at 11:19 AM, Jonathan Rochkind rochk...@jhu.edu wrote: Luis Lavena wrote: I haven't played enough with Rails 3 to actually use mongrel with it, but due the changes in rails 3 bootstrap, I would rather use rack or rails server directly instead of mongrel_rails. Or passenger. I get the feeling that most developers have abandoned mongrel for passenger, and mongrel no longer has very many developers working on improving/maintaining mongrel itself either. Well, I might be biased on my response. I've been working on bring new changes to mongrel to ease the development of it and set the ground to bring better rack integration from Unicorn. You can see all these changes here: http://github.com/fauna/mongrel/commits So is not fair to say that is abandoned. While I use passenger in some server, I still use mongrel in more than 75% of all my production environments, even locally. I'm cleaning up JRuby support for a new 1.2.0 release and new ones will follow. What I have suggested about using rails server instead of mongrel_rails is because mongrel_rails needs to be compatible with previous version of Rails, and I'm not a 100% Rails user to explore that. See this ticket: http://github.com/fauna/mongrel/issues#issue/2 That said, if anyone work on that would happily integrate it back. Thank you. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel(_rails) crashing with rails3
On Wed, Apr 28, 2010 at 10:38 PM, Doug Renn r...@nestegg.com wrote: I have this problem with a real application, but here's a simple test case that's failing the same way. (using ruby 1.8.7p249) New app: $ rails rails3 create ... $ cd rails3 Add 'mongrel' to Gemfile $ bundle install Fetching source index from http://rubygems.org/ ... $ rails server = Booting Mongrel = Rails 3.0.0.beta3 application starting in development on http://0.0.0.0:3000 = Call with -d to detach = Ctrl-C to shutdown server Starts with mongrel. But the following crashes: $ mongrel_rails start ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... /Volumes/Users/renn/.rvm/gems/ruby-1.8.7-p...@rails3/gems/railties-3.0.0.beta3/lib/rails/engine.rb:122:in `delegate': wrong argument type Symbol (expected Proc) (TypeError) from Not sure where to go from here. Any help would be appreciated. There are substantial changes in the way Rails 3 bootstrap that differ considerably from what mongrel_rails is trying to perform. The problem is that mongrel_rails needs to work with older versions of Rails and newer too. I haven't played enough with Rails 3 to actually use mongrel with it, but due the changes in rails 3 bootstrap, I would rather use rack or rails server directly instead of mongrel_rails. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Problem with mongrel_rails, but works with script/server
On Mon, Apr 19, 2010 at 9:21 AM, rpave...@gmail.com wrote: Hi there, I am having problem with mongrel_rails and I do not know whom to ask so I found your e-mail as one of the last people contributing to mongrel_rails, so may be you would be able to help me out. Please, email mongrel-users mailing list for problems, so in that way all benefit from the answers. http://rubyforge.org/mailman/listinfo/mongrel-users Here is the problem: My platform is XP, ruby 1.8.6, rails 2.3.2. mongrel-1.1.5-x86-mswin32-60, mongrel_service-0.3.4-x86-mswin32. I have my application working perfectly when I start it with script/server, but when I use mongrel_rails start it starts the app but on several controllers it breaks (not all of them though -how come???) and when it braks ti shows the message undefined method `reflect_on_association' for Service:Module Do you have a model called Service? mongrel_service it also contains a module called Service, so maybe ActiveRecord might be clashing, which is strange. Please provide a backtrace of the error, not just the last line of the error. When I set the break point in,the action of the controller where it breaks, and when the processing stop on this break point and if I type params It says Unknown command: params. Try help but If I type eval params it shows me the correct content of params hash: {action=index, controller=doctor}. Also if I type @_params it says Unknown commad @_params. Try help but if I type eval @_params it responds properly {action=index, controller=doctor} It even do not understands. If you're using ruby-debug, you need to eval to get information from the process you're debugging, you can't call params directly. Please help me if you can or may be direct me to somewhere where I could find help, advise or answers. Please provide a full backtrace, you might be using a served word for a controller or model that could be clashing with Mongrel, Rails or mongrel_service. Also, join and respond to mongrel-users mailing list, so all benefit from the findings. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Problem with mongrel_rails, but works with script/server
On Mon, Apr 19, 2010 at 2:07 PM, rpave...@gmail.com wrote: Hi Luis, thank you very much for the answer. Using eval (per your suggestion:)) I was able to start debugging the problem. The error shows up when executing the following statement: @customers=provider.customers Here is the full error log that gets shown on the browser: --- undefined method `reflect_on_association' for Service:Module RAILS_ROOT: C:/RubyOnRails/rails_apps/msms Application Trace | Framework Trace | Full Trace C:/RubyOnRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_rec ord/reflection.rb:257:in `source_reflection' C:/RubyOnRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_rec ord/reflection.rb:257:in `collect' C:/RubyOnRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_rec ord/reflection.rb:257:in `source_reflection' C:/RubyOnRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_rec ord/reflection.rb:288:in `check_validity!' C:/RubyOnRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_rec ord/associations/has_many_through_association.rb:5:in `initialize' C:/RubyOnRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_rec ord/associations.rb:1277:in `new' C:/RubyOnRails/ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active_rec ord/associations.rb:1277:in `customers' C:/RubyOnRails/rails_apps/msms/app/controllers/doctor_controller.rb:17:in `index' -- I have the following relatonships relating to this problem in my models: class Provider ActiveRecord::Base has_many :services has_many :customers, :through = :services .. . end class Service ActiveRecord::Base belongs_to :provider belongs_to :customer belongs_to :invoice .. . end class Customer ActiveRecord::Base has_many :services has_many :providers, :through = :services has_many :invoices, :dependent= :destroy .. . end class Invoice ActiveRecord::Base has_many :services belongs_to :customer .. . end What is puzzling is that if I use script/server (which starts the mongrel) all works fine, but if I use mongrel_rails start this error shows up. What is diffenrent under the hub between these two? script/server initializes Rails before Mongrel, while mongrel_rails does the opposite. Since you've installed mongrel_service gem, it defines a Service module, which is used as plugin to install inside mongrel how command functionality: http://github.com/fauna/mongrel_service/blob/master/lib/mongrel_service/init.rb#L8-9 If you aren't using mongrel_service, I would suggest you remove the gem. The problem is that the plugin for mongrel can't be named differently. If we do, then will break compatibility with old versions. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel script and config options
On Tue, Apr 13, 2010 at 5:34 PM, Pete p...@kapiti.co.nz wrote: I need to pass some startup options on to my rails application. Using environment variables will not work because multiple mongrel clusters of my rails application (each of a slightly different flavour) served from a single code base can run concurrently and each cluster instance is activated via mongrel_service. Extra arguments passed in to either mongrel_rails service::install or mongrel_rails cause errors. I think you've already reported this to me here: http://github.com/fauna/mongrel_service/issues#issue/4 And if wasn't you, pretty much is similar request. The only documentation on the --script option I could find related to unix so I gave up on that thought. Script takes any Ruby script and execute it before starting mongrel, and is honored by mongrel_service I also tried using the --config option, but I had the same problem there: as soon as I added an option to the YAML file that wasn't documented, mongrel complained with an error. mongrel_rails start --help: -C, --config PATHUse a config file -S, --script PATHLoad the given file as an extra config script -G, --generate PATH Generate a config file for use with -C mongrel_rails start -G foo.yml ** Writing config to C:/Users/Luis/projects/secret/foo.yml. ** Finished. Run mongrel_rails start -C C:/Users/Luis/projects/secret/foo.yml to use the config file. The last one is a real nuisance. It just doesn't make sense that my config file should be restricted to content mongrel understands. Wouldn't it be a better approach to parse that file and look/apply the options mongrel recognises and provide a public interface so that other interested clients can access the config file? Sorry, but is the configuration file *for* mongrel, nobody says to you that you should use it. The problem is that you're trying to use the same application, the same checkout of it and everything to run multiple instances that are different on configuration settings. Apologizes for this but that is wrong. Even sharing database.yml could lead to problems. Or are there other ways to achieve this without resorting to modifying mongrel and mongrel services startup code? Do checkouts of your application on different directories. Have per-location configuration settings like config/settings.yml that is not part of your application source code. Is kind of complicated expect the same application folder serve multiple versions of the same application. Perhaps if you would explain better what are those settings we can advise you on different approaches. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel script and config options
On Tue, Apr 13, 2010 at 7:25 PM, Pete p...@kapiti.co.nz wrote: Interesting is also this page http://guides.rails.info/configuring.html which states under 2.Running Code Before Rails: To run some code before Rails itself is loaded, simply put it above the call to require 'rails/all' in your application.rb. If I log boot strapping of rails, I get this different sequences: when using mongrel via script/server (notice boot.rb appears twice!!!): boot.rb environment.rb boot.rb application.rb when using mongrel via mongrel_rails: environment.rb boot.rb application.rb Note that while the latter option is the common way to start the application, the former option is what I must use to debug my rails application under Netbeans. I would avoid script/server as it loads mongrel incorrectly. So clearly, running code (that fetches custom specific command line options) before rails starts doesn't work well with either environment, let alone both. Can I know how are you doing it? I've even tried to place such code inside environment.rb which is clearly loaded before application.rb and still had no luck. Which part? the top? the bottom? Which version of rails? If you place the code in config/preinitializer.rb it will be loaded before environment.rb fully loads. So far, the only way that worked for me is to modify library code and this is something a dread. Please be more specific with the examples. Show us code so we can replicate and workout solutions. You can't supply command line options to mongrel_rails that are not supported, however, you can use either environment variables or other stuff. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel script and config options
On Tue, Apr 13, 2010 at 8:39 PM, Pete p...@kapiti.co.nz wrote: Hi Luis, First up, I'm still using Rails 2.2.2. I'm sorry, but I don't agree with you that a single code base for multiple different rails application is a bad idea, quite the opposite actually. If you're really interested in what we're doing, this thread explains it in more detail: http://railsforum.com/viewtopic.php?pid=74217. You're preaching to the wrong choir. I was the one that originated the approach of Radiant to build applications, and make gems of Rails applications with custom settings, database and configuration files. It was called fossilize, but due the constant internal changes of Rails was hard to keep it up. Since now is based on Rack (Rails 3), it might be easy to resurrect the idea. It shouldn't be too hard to see the many advantages of a single code base over multiple code bases for serving multiple clients similar applications. Is not that is hard to see, is hard to wrap Rails around that concept Reading your post what you actually need is more in the lines of Radiant approach: * make your application a gem * use a single directory for each individual application, but still depend on the same gem * extend or change the application with extensions from vendor, that might be different from client A to client B As I said, I played with the --script option but couldn't get it to work. Here is how I start mongrel from the command line for client FOO: mongrel_rails start -e production -p 3035 -l log/FOO/mongrel.log -S config/FOO/myapp_opts.rb -c x:/myapp But config/FOO/myapp_opts.rb is never loaded (I've also tried specifying the full path x:/myapp/config/FOO/myapp_opts.rb to no avail). If this worked, it would solve my problem. So what am I doing wrong? According to this: http://github.com/fauna/mongrel/blob/master/bin/mongrel_rails#L122-125 And this: http://github.com/fauna/mongrel/blob/master/lib/mongrel/configurator.rb#L342-348 The purpose of the config script is internal of Mongrel, not to setup stuff globally for the application like Rails. ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... ** Rails loaded. ** Loading any Rails specific GemPlugins ** Loading config/init_mongrel.rb external config script Also, it happens after Rails initialization. I would suggest you try the following: 1) put your init script code inside config/preinitializer.rb It gets executed by boot before Rails::Initializer.run of environment.rb. example: type config\preinitializer.rb STDERR.puts ARGV.inspect 2) Use something like MYAPP_TARGET=foo in the command line: mongrel_rails start MYAPP_TARGET=foo Will get you something like this: ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... [MYAPP_TARGET =foo] [MYAPP_TARGET =foo] ** Rails loaded. ** Loading any Rails specific GemPlugins (dunno why appears twice, is like the file gets loaded instead of required) 3) Add the additional parameter to created mongrel_service manually (registry editing) At this time, there is no way to specify additional parameters. I would like to move the configuration from command line to the registry, so is more easy to manipulate. That helps somehow? Thank you for explaining in further detail your need, it helped me provide you a better alternative. Of course, there is still room for improvement, and patches are always welcomed ;-) -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel script and config options
On Tue, Apr 13, 2010 at 10:49 PM, Pete p...@kapiti.co.nz wrote: 2) Use something like MYAPP_TARGET=foo in the command line: mongrel_rails start MYAPP_TARGET=foo Will get you something like this: ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... [MYAPP_TARGET =foo] [MYAPP_TARGET =foo] ** Rails loaded. ** Loading any Rails specific GemPlugins (dunno why appears twice, is like the file gets loaded instead of required) ** *** WOW!!! *** ** I had no idea that would work. What are these things called? They're not really options, are they? They are coming from ARGV, are not parsed by OptionParse (used by mongrel), so are just ignored and left available in ARGV. Just tried it out and not only can I trap these options easily using preinitialize.rb with mongrel_service as well as mongrel_rails, but it also works perfectly fine in script/server (sorry, I know you don't like this and I trust your judgement, but it is the only option I have when debugging under Netbeans). Hehe, well, if works for you for debugging will not say anything :) THIS SOLVES MY PROBLEM! Glad to hear that. I missed this feature completely or it is undocumented. Had I known that a couple of weeks back I could have spent a week at the beach and would still be further than I am now. config/preinitializer.rb is a hidden feature that actually nobody knows of it. It started to be more noticeable with the appearance of Bundler. Apologizes for you spending your time doing this, the mailing list should have been more exposed :( Now I've also noticed that mongrel_rails service::install doesn't complain at all if I specify such glyphs (like MYAPP_TARGET=foo). However, they are not added to the ImagePath. If you think this would be useful, I see if I can fix it and submit a patch? These options are not carried over. A minor patch that takes the left overs of ARGV and append to the registry line could work. Add the gist link with the diff to the mongrel_service GitHub issue, I'll get that integrated ;-) Many thanks again, its hugely appreciated. You're welcome :) Regards, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] No file uploads possible with mongrel?
On Mon, Apr 12, 2010 at 1:59 AM, Anton Trapp tmp...@allproducts.info wrote: Hello all! I am using mongrel in several production environments and it is working great! Now I have to put up some really large files (html multipart, no plugin used, some hundret Mb). The only thing I can produce with mongrel is: Sun Apr 11 06:13:21 + 2010: Error reading HTTP body: #RuntimeError: Socket read returned insufficient data: 3374 /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/http_request.rb:107:in `read_socket' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/http_request.rb:86:in `read_body' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/http_request.rb:55:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:149:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:149:in `process_client' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:285:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `initialize' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `new' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel.rb:268:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:282:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `each' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/configurator.rb:281:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/../lib/mongrel/command.rb:212:in `run' /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 /usr/bin/mongrel_rails:19:in `load' /usr/bin/mongrel_rails:19 Any ideas? alternatives? If you're mentioning hundred of megabytes it might be possible that the Ruby instance is not able to handle the file properly. Would be great if you can isolate this to a real minimum mongrel handler example instead of a Rails application. I had successfully uploaded big files with mongrel, but honestly never tried to upload 200mb or similar because will be suboptimal. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel_rails can't find memcache-client
On Wed, Mar 24, 2010 at 7:56 AM, T_ S_ li...@ruby-forum.com wrote: I added memcache-client to our app: config.gem memcache-client, :version = 1.8.1 According to gem list the gem is there: memcache-client (1.8.1) If I run our app with script/server everything works just fine but when I try to run it with mongrel_rails start it stops with error: no such file to load -- memcache-client So is there something different how mongrel_rails looks up gems? What is so special about this gem as the other gems work just fine? When you start mongrel_rails, you're doing without daemonize, correct? There is no configuration file that indicates mongrel should change user or group when running, correct? It might be that the memcache-client gem is not installed system wide. I've used mongrel_rails, combined with memcache-client and memcached in a bundler configuration and worked without issues, so the problem might be something else. Can you build an exact pastie/gist of the output you're receiving? (or can replicate with a simple rails app?) Thank you -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
[Mongrel] [ANN] mongrel_service 0.4.beta3 Released
mongrel_service version 0.4.beta3 has been released! * http://github.com/fauna/mongrel_service This plugin offer native win32 services for rails. This replace mongrel_rails_service. Since this is a pre-release gem, you can install it with: gem install mongrel_service --prerelease If no bug is found, expect an final release in the upcoming days. Please submit bug reports here: http://github.com/fauna/mongrel_service/issues Thank you. Changes: ### 0.4.beta3 / 2010-03-07 * Bugfixes: * Enable the service display name to contain spaces [sinclair] * Use a regex for more realible determination of service existance [sinclair] Closes GH-1 -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Upgraded to Ruby 1.9.1 and Mongrel now fails
On Wed, Feb 24, 2010 at 6:57 PM, Dave Walton dave.wal...@jax.org wrote: We recently upgraded to ruby 1.9.1 (in order to get new functions in the Math module). We've reinstalled Mongrel with it, and even gone so far to make some modifications to the compile (based on a post I found on one of the forums). Mongrel now fails when we try to launch it: mongrel_rails cluster::start With the message: ERROR RUNNING 'cluster::start': Plugin /cluster::start does not exist in category /commands Use help command to get help Has anyone seen this error? Is there a known fix? I saw a posting from a couple years ago about need to a: Gem cleanup mongrel_cluster Has you installed mongrel_cluster gem? I'm not aware that mongrel_cluster is compatible with Ruby 1.9.1 -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel_service folder has different name
On Tue, Feb 9, 2010 at 3:03 AM, Sig Dx li...@ruby-forum.com wrote: Hello guys, I'm trying to run a Rails up using Mongrel on a Windows machine. In the same machine I have already installed (successfully) an other Rails app that uses Mongrel as well. I din that almost 2 years ago so I don't remember exactly what I did but I guess I have followed the same steps. Now when I try to start Mongrel C:\rails_apps\freshmintappmongrel_rails start -e production -p 5001 I get the error below: c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- c:/ruby/lib/ruby/gems/1.8/gems/mongrel_service-0.3.4-x86-mswin32/lib/mongrel_service/init.rb (LoadError) from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from c:/ruby/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:134:in `load' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:235:in `each' from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:235:in `each' from c:/ruby/lib/ruby/gems/1.8/gems/gem_plugin-0.2.3/lib/gem_plugin.rb:112:in `load' from c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/mongrel_rails:278 from c:/ruby/bin/mongrel_rails:16:in `load' from c:/ruby/bin/mongrel_rails:16 The first thing I did was to check out the presence of init.rb and I discovered that the folder mongrel_service-0.3.4-x86-mswin32 doesn't exist or better it has a different name: mongrel_service-0.3.4-i386-mswin32. Anyone have an idea why this is happening? How can I solve it? Could be a bug from mongrel_service and one of its dependencies. Please remove the gem and try install it again. Also, verify you have latest gem_plugin gem installed. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Using mongrel_rails: Can't install Redmine as win2003 service
On Sat, Nov 21, 2009 at 7:20 PM, Anton Andriyevskyy x.meg...@gmail.com wrote: Hello everyone. After stugging 3+ hours installing redmine I got success but still can't install redmine as service (windows 2003). So here is my problem. I successfully installed redmine and mapped it to mysql, created database and initialized it with default values. Last thing I'm trying to do is to install it as service on windows 2003, and for this I'm running in cmd mode this instruction: mongrel_rails service::install -N Redmine -c [your redmine folder] -p [portno] -e production and I get this error: C:/ruby/lib/ruby/gems/1.8/gems/win32-service-0.7.0-x86-mswin32-60/lib/ win32/service.rb:282:in `initialize': no options provided (ArgumentError) When I try without params: mongrel_rails service::install ... it just says that name (-N) is obligatory. But when I try with name only (-N), I get the same error. Please uninstall win32-service 0.7.0 mongrel_service has been linked to an specific version of win32-service due API changes. gem install win32-service -v 0.5.2 -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Using mongrel_rails: Can't install Redmine as win2003 service
On Sat, Nov 21, 2009 at 8:58 PM, Anton Andriyevskyy x.meg...@gmail.com wrote: Hi Luis. Thanks for help, it worked with old version of win32-service. Does this mean I'll be not able to run both win32-service versions together to keep another ruby-applications working which requires win32-service 0.6+ ? mongrel_service uses gem method to lock to one specific version of win32-service. Seems is not working as expected, which could be due an old RubyGems version. Please update to latest RubyGems 1.3.5. I don't have too much time now to update mongrel_service, but if you want make it API compatible with latest win32-service, I'll happily apply the patches and make a new release. The repository is here: http://github.com/fauna/mongrel_service -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Problems with mongrel_service and used account
On Sun, Nov 15, 2009 at 9:21 AM, Markus Liebelt mlieb...@web.de wrote: Hi everybody, I try to use in a rails application that is installed with mongrel_service on windows the win32ole API to access Outlook appointments. This works well when started from the command line, but does not work when started as a service. What should I check in which order to trap down the error? Hello Markus, Services run without privileges for certain things, like create objects and such. Since you're executing from the command line and work, means that your user has access to these OLE objects. There are two options: 1) Configure the service to run under the same user account (that can be done from the services management interface) 2) Determine the issue using psexec. Try to lower the privileges of the prompt and execute the exact same command line. The tools you need are psexec, as I mentioned here: http://rubyforge.org/pipermail/mongrel-users/2007-February/003006.html See that thread for details. Please also include in your reply information about your OS (32bits or 64bits), versions of Ruby and the gems installed too. There is a known issue with 64bits Windows that was solved in latest gem release, just in case. Cheers, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Patch to fix mongrel_service bugs with Windows Vista/2008 support and log file location
On Fri, Sep 11, 2009 at 7:03 PM, Daniel Gies daniel_g...@bigfix.com wrote: Hello Mongrel users, I¹m a software developer at BigFix ( http://www.bigfix.com ) and we use Mongrel in one of our products. We have made changes to the mongrel_service component to address problems outlined in Mongrel tickets 44 and 54: http://mongrel.rubyforge.org/ticket/44 http://mongrel.rubyforge.org/ticket/54 The modifications are as follows: Change the way mongrel_service detects its runtime environment to use a method compliant with the Windows Vista security model. This modification consists primarily of replacing elevated privilege code for process inspection with a command-line argument. Check for the ³-l² command line option and use that for the log file instead of using a hard-coded location. The ³-P² option was not implemented. In accordance with term 2.a of the Ruby License ( http://www.ruby-lang.org/en/LICENSE.txt ), we are making our changes freely available to the open source community. The patch is based off of root/branches/stable_1-2/projects/mongrel_service as of 2009-09-10, also known as mongrel_service 0.35. If you would prefer to receive the patch in an email attachment please let me know. Hello Daniel, Thank you for your patches! I'll have to invest on mongrel_service the upcoming week to fix this issue and integrate other pull request at GitHub repository. While I can do manually, would you mind review your patches against mongrel_service repository at GitHub? http://github.com/fauna/mongrel_service Either way, I'm going to take care of this. Thank you once again for your contributions. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] mongrel_service on Win2003
On Wed, Jul 29, 2009 at 1:03 PM, Darren Syzlingdsyzl...@gmail.com wrote: 2009/7/28 Darren Syzling dsyzl...@gmail.com: Clearly I'm missing something and mongrel_service is encountering some lack of permission since as I said adding the service account to the administrators group the app works fine. Is our server tied down - yes could be pretty tightly, ipsec rules etc. It does have Kaspersky. I may have to grab the code for mongrel_service and attempt to instrument it to see how far it gets. Unless there's any further debugging steps I can try? Thanks Darren After posting yesterday I also came across this thread which looks very similar to the situation I'm encountering: http://www.ruby-forum.com/topic/155315. I wonder if this was issue was resolved? I believe it was. Can you check and supply the output of servicefb.log? Apologize for the detail but work has been hectic lately. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] mongrel_service on Win2003
On Mon, Jul 27, 2009 at 11:38 AM, Darren Syzlingdsyzl...@gmail.com wrote: I'm trying to run mongrel_service for a small rails app under Win 2003. I have installed the service and can run with the default local system account fine. However once I change the account to a new custom service account I cannot start the service. Nothing is being logged, in the event log or any of the mongrel logs. The -B switch doesn't create any debug logs. I know this is going to be a Windows permission that hasn't been granted it's just how to track it down? What does work: - local system - Log in as my admin account, use runas to run a command prompt as my new service user - then copy the mongrel_service path/paramters from the registry and run as is (modified as mongrel_rails) - this works fine. Initially I had a warning about the ./log directory but once granted full control all seems fine. - The service account is marked with run as service, ./log and ./tmp have been updated to allow full control for the service account, the account is also a member of the users group (which inherits some default file system ACLs). Note some of these I would not normally do for a least priv account but just to document what I've tried. - Adding administrators group to the service account - of course seems to clear the problem. Anything else I can check? Check mongrel_service.log inside ruby/bin folder. With the information stored there I would be able to help you better. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] mongrel_service on Win2003
On Mon, Jul 27, 2009 at 4:22 PM, Darren Syzlingdsyzl...@gmail.com wrote: Luis Lavena wrote: Check mongrel_service.log inside ruby/bin folder. With the information stored there I would be able to help you better. The mongrel_service.log is empty. I've granted full control on the log file for the service user in question in case this is an file ACL issue, but nothing being logged. Ok, that means we are going to go over the runas console debug mode. I'm going to remove the dust my instructions on this: http://rubyforge.org/pipermail/mongrel-users/2008-October/005587.html And pointing to the guide to debug mongrel_service http://rubyforge.org/pipermail/mongrel-users/2008-October/005588.html Which links here: http://rubyforge.org/pipermail/mongrel-users/2007-February/003004.html Please let me know if these instructions are not easy to follow, but everything is there to debug the issue. Cheers, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] [Mongrel-development] Mongrel, cross compilation, Echoe and rake-compiler
On Sun, Apr 26, 2009 at 10:59 PM, Eric Wong normalper...@yhbt.net wrote: Luis Lavena luislav...@gmail.com wrote: On Sun, Apr 26, 2009 at 10:12 PM, Evan Weaver e...@cloudbur.st wrote: My plan is as so: Gossamer + Rack launch script + some optimizations/bugfixes + Ruby 1.9 compat = more or less Mongrel 2.0. The work on this has already started? Gossamer is the codename? Did you miss my earlier message posted to this list? http://rubyforge.org/pipermail/mongrel-development/2009-April/000323.html Actually ignored for the simple sake that states *nix compatibility only, which is not my case since I'm on Windows It's a branch of Unicorn and in the same repositories: git://git.bogomips.org/unicorn.git http://git.bogomips.org/unicorn.git git://repo.or.cz/unicorn.git (mirror) http://repo.or.cz/r/unicorn.git (mirror) Have fun! Will take a look, keeping in mind that *must* work across all the platforms, at least cleanly like Mongrel does. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] [Mongrel-development] Mongrel, cross compilation, Echoe and rake-compiler
On Sun, Apr 26, 2009 at 10:12 PM, Evan Weaver e...@cloudbur.st wrote: I think that's a good plan. Echoe has some rudimentary cross-compilation (used for JRuby), but not for Mingw. Your way is better. rake-compiler still doesn't support JRuby, but perhaps a JavaJarTask is coming, but I'm not holding my breathe until I see these patckes ;-) My plan is as so: Gossamer + Rack launch script + some optimizations/bugfixes + Ruby 1.9 compat = more or less Mongrel 2.0. The work on this has already started? Gossamer is the codename? This puts you in a tough spot, but it's probably best to branch off Gossamer and let me forward-port whatever is missing. The 1.x branches are effectively dead, except for a Ruby 1.9 compat update (v1.1.6). I've no problem working with bleeding edge stuff, as long I can find it :-) I promise to get to this every weekend, and don't, so I'll stop promising. I may be able to squeeze some time out of work to spend on it. No rush, my only concern is ensure Mongrel itself works on the upcoming One-Click Installer. Got all the details ironed to do a release tonight, and when started to install in a sandbox found that Mongrel wasn't working. Anyhow, now I have a Mac so 3 way testing between Linux, OSX and Windows is now possible form my side, so promise not break anything :-) Cheers, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] error : Redmine
On Wed, Mar 11, 2009 at 1:29 PM, Gokul Cv li...@ruby-forum.com wrote: Hello Luis, Thank you for writing in. I have submitted my post under the 'ruby' forum section. Note that i have also furnished information regarding my infrastructure. Please have a look into this. Thank you. Gokul, That doesn't help me. I'm subscribed to the real mailing list, not the forum bridge of ruby-forum. Please include all the related links and information in the same email so anyone can take a look without doing a search and research to help you out. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel as a Windows Service (not running Rails)
On Thu, Feb 19, 2009 at 3:24 PM, Daniel Mantilla li...@ruby-forum.com wrote: Hi, I hope you can help me with this. I have implemented a simple web app on top of Mongrel and now I need to run it as a Windows Service. I explored the mongrel_service gem and it looks like I will need an executable (.exe) for this. Is there a way to use the existing mongrel_service.exe to run my own script? mongrel_service gem was implemented to work with Rails. Inside the gem there is mongrel_service.exe (inside bin), but that only works with mongrel_rails script. While your user case is a valid one, was not considered when developed. You have a few options for your situation: 1) check mongrel_service FreeBASIC code (which is the actual service) and implement your own variation. (willl take you some time) 2) look into options like svrany or firedaemon, which let you run console applications as services. Thanks in advance, Hope this helps, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] feature request: output well in windows
On Fri, Dec 19, 2008 at 9:04 AM, Roger Pack li...@ruby-forum.com wrote: I realize not many people will benefit from this, but it would be nice if mongrel_rails, in development mode, output the tail of its log with color output on windows. Currently it outputs it with the Linux style coloration marking which is somewhat confusing. Is not possible. For that mongrel will require to depend on win32console to capture ANSI coloring and output colored strings. ANSI coloring differs from Windows coloring since Windows allow page locks and memory buffers to be updated. In that front, ANSI is dumb. If you want color highlight use tail from msys ;-) Anyway, now I realize it better, mongrel_rails doesn't output with colors, the one that outputs is Rails to log/development.log. Regards, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exupéry ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] mongrel and fastthread on ruby 1.9?
On Sat, Nov 22, 2008 at 9:41 PM, Roger Pack [EMAIL PROTECTED] wrote: Hmm looks like that didn't help. I typically just install mongrel from the mongrel SVN into 1.9. -=R ? Sorry but I get lost if you cut the whole thread that you reply to. fastthread dependency is not removed right now, is planned. -- 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] Mongrel cluster processes not starting
On Sat, Nov 22, 2008 at 5:23 AM, Richard McIntyre [EMAIL PROTECTED] wrote: I am starting my mongrel processes with mongrel_rails cluster::start or sudo mongrel_rails cluster::start starting port 8000 starting port 8001 starting port 8002 starting port 8003 and they appear to have started, but they haven't mongrel_rails cluster::status gives me missing pid_file: /var/www/railsdeploy/current/tmp/pids/mongrel.8000.pid missing mongrel_rails: port 8000 missing pid_file: /var/www/railsdeploy/current/tmp/pids/mongrel.8001.pid missing mongrel_rails: port 8001 missing pid_file: /var/www/railsdeploy/current/tmp/pids/mongrel.8002.pid missing mongrel_rails: port 8002 missing pid_file: /var/www/railsdeploy/current/tmp/pids/mongrel.8003.pid missing mongrel_rails: port 8003 Why could this be?? I have opened up the permissions so all can access these, I have even tried it at 777 but I get the same results. If I add dummy pids to the directory it notices they are there and gives me errors on start up so it is recognizing this directory, but not bothering to add the pids or start up... Somebody help! Did you tried to start just one mongrel? mongrel_rails start and check if your application is not failing for other reasons. -- 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] Download page for mongrel_cluster?
On Fri, Oct 10, 2008 at 10:28 PM, Paul Lynch [EMAIL PROTECTED] wrote: Is there a download page for mongrel_cluster? I see that gem install mongrel_cluster works, but I can't see where it's coming from. Usually gems have some sort of project page somewhere. (replace find with grep on *nix) [EMAIL PROTECTED] (D:\Users\Luis) $ gem spec --remote mongrel_cluster | find project rubyforge_project: mongrel Here you will find the gems: http://rubyforge.org/projects/mongrel http://rubyforge.org/frs/shownotes.php?release_id=16359 HTH, -- 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] mongrel_service problems
On Wed, Oct 8, 2008 at 6:44 PM, Glen Holcomb [EMAIL PROTECTED] wrote: I have installed mongrel_service and created a service instance with the -l flag and the -B flag but I still don't get any useful feedback. When trying to connect to my server via Apache I get a 503 error and when connecting directly (http://127.0.0.1:3000) I get a timeout. The files.log just has a list of log files in it for each request and the rest of the log files have nothing but lines saying TRACING but nothing that looks like info to me. The log file I specified in the -l flag isn't appearing. I've tried giving the full path and file name and I've tried a relative path log/mongrel_service.log What am I doing wrong? Right now mongrel_service has a huge drawback: it doesn't let you log to different files. Blame me, blame the no argument parsing of the redirected terminals :-P Did you tried executing your application with mongrel_rails standalone instead of the service first? Also, you can mimic what the service does from the terminal, asi described previous in several threads in this list (search google for mongrel_service debug console). Here some pointer: http://rubyforge.org/pipermail/mongrel-users/2007-February/003004.html I should definitely collect a list of that stuff and make a blog post :-P -- 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] offline/local install of mongrel_service
On Wed, Sep 17, 2008 at 12:14 PM, Zainab Memon [EMAIL PROTECTED] wrote: I am trying to install mongrel_service 0.3.4 on a server that does not have any outside internet connection. It has ruby 1.8.6 and I have been installing gems by copying the source into ..\ruby\lib\ruby\gems\1.8\gems and then doing a gem install --local using the .gem file. I was able to find and install all the gem dependencies of mongrel_service through rubyforge except win32-service which required version 0.5.2, which was not readily available through rubyforge's win32 utilities page (http://rubyforge.org/frs/?group_id=85). I ended up finding the gem win32-service-0.5.2-mswin32.gem I needed through google (http://rubyforge.org/frs/download.php/15355/win32-service-0.5.2-mswin32.gem) but I suspect if might have been corrupted. I installed this gem, then installed mongrel_service. After installing mongrel_service there is no mongrel_service.exe in ..\ruby\bin. Does anyone have any suggestions as to how I can successfully install mongrel_service? Hello Zainab, If you don't have internet access, then will be really hard for you to fulfill all the dependencies. if win32utils project administrator decided to hide previous releases, the files are still there, as you found. The gem is not corrupted. The mongrel_service executable will be copied automatically the first time you install (with service::install) a Rails application. So: 1) download manually the following gems (you can use wget or enter the url in your browser) http://gems.rubyforge.org/gems/cgi_multipart_eof_fix-2.5.0.gem http://gems.rubyforge.org/gems/mongrel-1.1.5-x86-mswin32-60.gem http://gems.rubyforge.org/gems/gem_plugin-0.2.3.gem http://gems.rubyforge.org/gems/mongrel_service-0.3.4-i386-mswin32.gem http://gems.rubyforge.org/gems/win32-service-0.5.2-mswin32.gem 2) install with gem install --local in the same order I listed above. 3) install your rails application as service: mongrel_rails service::install (all the params here) 4) Done, you can now start the service with net start ... and net stop ... HTH, -- 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] Error when install Mongrel as a Windows service
On Tue, Sep 16, 2008 at 6:01 PM, Sophie Su [EMAIL PROTECTED] wrote: I have Ruby and Rails 2.1.1 installed, then I installed mongrel 1.1.5. Now I want to install mongrel as a service. I downloaded and installed mongrel_service-0.3.3-mswin32.gem. After all these, I followed the instructions to install it as service by running the command below, but got an error. Did you install mongrel_service using RubyGems locally or remote? If you downloaded the gem and installed locally then the win32/service dependency will not be fulfilled. mongrel_service requires a specific version of that win32-service gem = 0.5.2 and less than 0.6, since that version introduced some incompatibilities that require a lot of code change in the plugin. -- 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] 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\hellomongrel_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] Mongrel on Ruby 1.8.6 w/ patchlevel 279 (Win)
On Sat, Aug 16, 2008 at 7:35 AM, Roger Pack [EMAIL PROTECTED] wrote: C:\ruby18gem install mongrel -include-dependencies Building native extensions. This could take a while... ERROR: Error installing mongrel: ERROR: Failed to build gem native extension. Yeah you'd need to install the devkit to be able to compile it [to force compilation install it as gem install mongrel --platform ruby]. As a note when I do install the latest mongrel precompiled for mingw, I get: c:\roger\dev\test_rails_appirb irb(main):001:0 require 'mongrel' Gem::LoadError: Could not find RubyGem echoe (= 0) That's new, I'm taking a look right now. Thanks Roger to reporting it. -- 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] Unresponsive Mongrel Windows 2003 Timeout Shutdown
On Wed, Aug 13, 2008 at 11:45 PM, Chris Schmitt [EMAIL PROTECTED] wrote: I have a very strange issue going on that just started happening last week. I am running an apache/mongrel stack on a windows 2003 box connecting to a sql server 2005. Apache 2.2.3 Mongrel 1.1.5 Since last Thursday I have had 5 crashes where the mongrel service becomes unresponsive. If I restart the service all is fine. Nothing is being reported in the rails logs... But I did notice something in the mongrel logs. Each time it look like I get the following log entry: ** INT signal received. Wed Aug 13 15:01:20 -0500 2008: Reaping 103 threads for slow workers because of 'shutdown' Thread #Thread:0x8553270 sleep is too old, killing. Wed Aug 13 15:01:20 -0500 2008: Error calling Dispatcher.dispatch #Mongrel::TimeoutError: Mongrel timed out this thread: shutdown c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel.rb:221:in `process' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel.rb:159:in `process_client' c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/bin/../lib/mongrel.rb:158:in `each' I have seen this pattern repeated for each of the crashes. I have 5 instances running and about 50 concurrent users who are banging away at this web application. Any advice or thoughts would be much appreciated. Thanks in advance Hey Chris, I have seen this, but with mysql. When you try to stop the mongrel_service, mongrel is trying to stop all the threads that are pending, so that is what you see is being logged in the mongrel log. There are several ways to end having stalled threads, a few of them involves timeouts and disconnections from the database. You can check the docs about that here: http://mongrel.rubyforge.org/wiki/FAQ#WhydoIgetMySQLlostconnectiontodatabaseerrors The other issue can be related to code that is being doing something wrong in some request and just never finish those. This FAQ section describe what to do on a *nix environment: http://mongrel.rubyforge.org/wiki/FAQ#WhydoesMongrelkeepdyingonme But since you're not there, you can: 1) remove and reinstall the mongrel_service adding the debugging option (-B or --debug) 2) Start the service 3) when you see it is staled, stop it and collect the log information to pinpoint which thread and which library break it.. Hope this help you, but without more information about your Rails version, Ruby version (and patchlevel) and some lirbaries involved I cannot comment further than that :-D Regards, -- 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] custom_require.rb:27:in `gem_original_require': no such
On Sun, Aug 10, 2008 at 5:11 PM, Luiz Biagi [EMAIL PROTECTED] wrote: Will Green wrote: The answer is in the dump from Mongrel startup: `gem_original_require': no such file to load -- win32/service (MissingSourceFile) Try installing the win32-service gem. thanks man, I somehow was with the service version 0.0.1, now I installed the mswin32 up to date version and I'm receiving a new error: = Booting Mongrel (use 'script/server webrick' to force WEBrick) = Rails 2.1.0 application starting on http://0.0.0.0:3000 = Call with -d to detach = Ctrl-C to shutdown server ** Starting Mongrel listening at 0.0.0.0:3000 ** Starting Rails with development environment... ** Rails loaded. ** Loading any Rails specific GemPlugins Exiting C:/Ruby18/lib/ruby/gems/1.8/gems/mongrel-1.1.5-x86-mswin32-60/lib/mongrel/config urator.rb:372:in `trap': unsupported signal SIGUSR1 (ArgumentError) from Can you tell us which version of Ruby and RubyGems you have installed? Looks like is trying to setup signals not support on Windows (SIGUSR1). Is just me or you've installed mongrel with --platform=mswin32 during the gem installation? That is plain wrong. You should install the gem available for your platform, which I think is mingw32. -- 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] Starting Mongrel as Windows service
On Tue, Jul 8, 2008 at 1:51 AM, Justin To [EMAIL PROTECTED] wrote: Hi, I'm very new to Mongrel and RoR. I found this command: $ mongrel_rails_service install -n blog -r c:\data\blog \ -p 4000 -e production But I'm not sure if I'm suppose to modify any of those commands. Or should I just press enter and leave it as is? Hello Justin. Dunno where you found those commands, but they are not up to date. This page contains more actual information: http://mongrel.rubyforge.org/wiki/Win32 1) To install a service, from the root of your rails application, do this: mongrel_rails service::install -N blog That will create a blog service that you can start or stop using net commands: net start blog net stop blog 2) To remove the service, only do this: mongrel_rails service:remove -N blog Notice the use of uppercase N, that changed some time ago due a clash of parameters between service and cluster. Now is N. Thanks! HTH, -- 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] Starting Mongrel as Windows service
On Tue, Jul 8, 2008 at 5:57 PM, Justin To [EMAIL PROTECTED] wrote: Thanks for the help Luis. However, I was a little confused since you said I must use: mongrel_rails service::install -N blog while the link you gave me says: mongrel_rails service::install -N myapp \ -c c:\my\path\to\myapp -p 4000 -e production What do the extra parameters do? you can check for yourself: mongrel_rails service::install -h that will give you a detailed list of what means each one. You can use the -c one if you want to install the service from outside your RAILS_ROOT. Thanks!! You can look for the other ones: port and environment :-) HTH, -- 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] Patching Ruby 1.8.6 p11X To Avoid SEGFAULTs
On Thu, Jun 26, 2008 at 3:25 AM, Zed A. Shaw [EMAIL PROTECTED] wrote: On Thu, 26 Jun 2008 02:02:30 +0200 Luis Lavena [EMAIL PROTECTED] wrote: Thanks Zed, we are merging those with our own patches for Ruby One-Click Installer (MinGW version). Right now: 1564 tests, 14742 assertions, 6 failures, 50 errors I need to take a look at the tests patches too, since before I got only 3 failures :-D If you're using the p114 branch, then those are related to changes in REXML and soap4r stuff. If you can find out how to make it all clean then great, but most people seem to not care about that. On the p111 it should be much better since p114 was when they added the soap and xml changes. Thankfully I was wrong, those were a mix of p230 results, sorry for the noise. Now we have 4 failures, +1 from the p114 which ruby-core told just to ignore because are some silly japanesse ruby on windows tests (yeah, I know, don't get me started). Thank you man for the heads up, this add the 3rd patch to out collection based on p114, now fully automated to build One-Click Installer ;-) Take care, -- 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] Patching Ruby 1.8.6 p11X To Avoid SEGFAULTs
On Wed, Jun 25, 2008 at 7:01 PM, Zed A. Shaw [EMAIL PROTECTED] wrote: Hey everyone, I know some of you have ran into the latest security fix causing SEGFAULTs in Rails applications. This is apparently due to changes in the class duplication code in Ruby, but I don't have much more information. I do however have instructions for people who need these security fixes now. The very nice and smart Hongli created a patch for his Ruby2EE project that also works for Ruby 1.8.6-p111 or Ruby 1.8.6-p114 with some modification. PATCHING P114 Here's how you can use it to patch p114. Grab the Ruby 1.8.6 p114 source, untar it, then cd into the source directory. You have to be in the source directory when you start this process. Not above it, not below it, right in it. I show you this command as the first thing. - $ cd ruby-1.8.6-p114 $ wget http://blog.phusion.nl/assets/r8ee-security-patch-20080623-2.txt ... 2008-06-25 12:46:39 (63.1 KB/s) - `r8ee-security-patch-20080623-2.txt' saved [11939/11939] $ patch -p1 r8ee-security-patch-20080623-2.txt patching file array.c patching file bignum.c patching file eval.c patching file intern.h patching file io.c patching file lib/webrick/httpservlet/filehandler.rb Reversed (or previously applied) patch detected! Assume -R? [n] n Apply anyway? [n] n Skipping patch. 4 out of 4 hunks ignored -- saving rejects to file lib/webrick/httpservlet/filehandler.rb.rej patching file sprintf.c patching file string.c - Notice how I had to tell it to skip changes to Webrick? Nobody here runs webrick so that's just fine. After this you can do the usual ./configure, make, make install and get your Ruby back. PATCHING P111 The process should be exactly the same, just you won't have to tell it skip the patch to webrick. WHAT's IN THIS PATCH? Hongli collected patches from the FreeBSD crew, and then pulled them together with a security fix in eval.c he was given. You can read the thread here: http://www.ruby-forum.com/topic/157034 The md5sum that I have for this patchfile is: 74405e3f4a0c1e0484c303a33c0a6f0d r8ee-security-patch-20080623-2.txt If your md5sum is different then I recommend contacting Hongli for help. Consider giving him money for a short consulting contract since he obviously knows his shit. THE CATCH: NOT TESTED BY ME Alright, so don't go running out trying this shit without some testing. Not testing is what got everyone in this mess. All the bigger ruby players I know are doing this, and they say it works. Hongli is using it and it works for him. You are not a big ruby player or Hongli. So, test your stuff completely, then roll it out. Please report back to me if you have problems with the patch and/or if it works great for you so I can help some other folks out. Thanks people. Always looking out for ya. Thanks Zed, we are merging those with our own patches for Ruby One-Click Installer (MinGW version). Right now: 1564 tests, 14742 assertions, 6 failures, 50 errors I need to take a look at the tests patches too, since before I got only 3 failures :-D -- 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] Mongrel as Windows service with normal privileges
On Thu, Jun 5, 2008 at 4:19 PM, Ingmar Stieger [EMAIL PROTECTED] wrote: The normal user may run the whole rails stack as service without problems. I hacked ServiceFB_Utils.bas to ignore the result of parent_name, and now it works as expected (btw, you are right, FreeBasic isnt' that hard :)) with limited rights. The test was run on the isolated XP home machine, so no group policies are in effect. So, at the end, the ServiceHost automatic stuff didn't do the trick, which is a pain. I wrote that code to be more intelligent, but I think Windows beat me, again :-P Can you provide me your patch for ServiceFB library in google code?: http://code.google.com/p/mmediasys-labs/ Just create a new issue and attach / paste your patch, I'll really appreciate get rid of this thing that, at the end, didn't provide anything but just bring pain to us (sniff) :-P Hope this helps, Ingmar It really does! Sorry for my late answer to this, been a bit hectic lately, but I'll really appreciate your code changes. -- 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] patched ruby seems to break mongrel?
On Mon, Jun 23, 2008 at 3:59 PM, David Shettler [EMAIL PROTECTED] wrote: Hey all, patched ruby on my development and production environments to 1.8.6-p230 to address these new ruby vulnerabilities: http://www.ruby-lang.org/en/news/2008/06/20/arbitrary-code-execution-vulnerabilities/ I still think those are not vulnerabilities but bugs, anyway... mongrel began segfaulting after restarting. Then tried ruby 1.8.7-p22 and upgrading to rails 2.1.0 (from rails 2.0.2), same issue. Had to revert back to the vulnerable GA 1.8.6. 1.8.7 is not a good thing to try, for your own health, stay away from it, even more for production. 1.8.6-p111 seems stable to me, even with those vulnerabilities around it. Running centos 4, mongrel 1.1.5 (tried 1.1.3, 1.1.4 as well, all same results). Any further info I can provide, I'd be glad to. I suggest you read this post from Ruby On Rails weblog: http://weblog.rubyonrails.com/2008/6/21/multiple-ruby-security-vulnerabilities More important: read the comments, are more valuable than the blog post itself. Regards, -- 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] patched ruby seems to break mongrel?
On Mon, Jun 23, 2008 at 9:02 PM, John Weir [EMAIL PROTECTED] wrote: Also, 1.8.7 is a little shaky right now; I recommend avoiding it. This is off topic, but can your or Luis provide some information, or links, on what makes 1.8.7 shaky or unsuitable for production? 1.8.7 backported lot of stuff from 1.9, which broke RubySpec: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/16554 At the end something of this was solved, but there are still some guards around some 1.8.7 specific stuff. 1.8.7 also introduced bugs for some GUI tools, like wxRuby: http://rubyforge.org/pipermail/wxruby-development/2008-April/001287.html Regarding the patchelevel stuff, the own tests for ruby don't pass, as I commented here: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/17364 So I cannot provide an updated version of One-Click Installer for 1.8.7 or 1.8.6-p230 if: 1.8.7 break packages that OCI bundles (wxRuby) and p230 cannot complete it's own tests... thank you very much - jw No problem, take care!. -- 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] Mongrel as Windows service with normal privileges
On Thu, Jun 5, 2008 at 10:11 AM, Ingmar Stieger [EMAIL PROTECTED] wrote: Luis Lavena wrote: 32bits or x64 editions? Windows 2003 32bit. In any case, serviceFB.log and mongrel.log and mongrel_service.log should be stored into ruby/bin folder since was not possible by the service point to the directory of the service. Thanks for the hint of using mongrel_service 0.3.3. I get these log files now: servicefb.log: _initialize() constructor _initialize() constructor done ServiceProcess(new_name) ServiceProcess(new_name) done ServiceHost() ServiceHost() done ServiceHost.Add() _add_to_references() _add_to_references() done ServiceHost.Add() done ServiceController.RunMode() CurrentPID: 5108 ParentPID: 512 Error with OpenProcess GetLastError: 0The operation completed successfully. Parent Name: ServiceController.RunMode() done ServiceHost() destructor ServiceHost() destructor done ServiceProcess() destructor ServiceProcess() destructor done _terminate() destructor _terminate() destructor done mongrel_service.log: # Logfile created on 05.06.2008 09:51:06 native/mongrel_service.bas:44, mongrel_service.singlemongrel.constructor: redirecting to: c:\ruby\bin\mongrel.log Not very helpful - OpenProcess fails with no apparent error. Because it couldn't get parent process name. I suggest you also try the psexec tool from Sysinternals and also runas program (builtin in Windows) to get more detail information. Could you please explain what you want me to do ? I think I have ran everything I can using psexec and as the actual service user (explained in my initial post). If there is something else, I will happily run it :). On the other hand, since it works using these two methods, no error message will appear. Only the service itself can not be started. On this ticket: http://rubyforge.org/tracker/?func=detailatid=5145aid=10820group_id=1306 You can use PsExec tool [1] to simulate another user and remove administrative privileges for testing: You can search the mailing list and other tickets that explain how to perform it (was discussed several times). Can you provide the 'sc queryex' and 'sc qc' for your service and pastie it here? [1] http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx -- 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] Mongrel as Windows service with normal privileges
On Thu, Jun 5, 2008 at 11:23 AM, Ingmar Stieger [EMAIL PROTECTED] wrote: I digged a bit through the source code, and I am under the impression that a normal user may not query the service control manager with PROCESS_QUERY_INFORMATION. Could this be the case ? Look at the source code for 0.3.4 you will find that a process can be opened for readonly functions and perform PROCESS_QUERY_INFORMATION without problems. That worked on 32 and 64 bits versions of many Windows Servers and XP, so shoudl work in your scenario too, unless that specific user lack the permission to run and control services which you will need to check with your sysadmin for that configuration. _process_name does not return the name and _process_name_dyn_psapi fails as well. (tested with 0.3.1 and 0.3.3). It looks like OpenProcess can not be used in this manner... In a totally unrelated project [1] I solved what I think you are trying to do here differently: I just pass the parameter -runservice from SCM in order to determine if the application should run as service (called from SCM) or as a normal console application. Maybe this would be an easier approach for mongrel_service as well ? Basically mongrel_service inherited code from other project named ServiceFB, which is a framework we created for other purposes at the office. It worked without issues on lot of scenarios, and it automatically determine the running environment so you avoid the requirement to analyze the command line. I would create a proof of concept, but unfortunately, I am not proficient with FreeBasic... Actually, it's basic, there are not too many keywords to worry about (ruby has more) and it's like C, I mean, you don't need to hack a lot of stuff to go low level :-) Bye, Ingmar HTH, -- 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] Mongrel as Windows service with normal privileges
On Thu, Jun 5, 2008 at 2:04 PM, Ingmar Stieger [EMAIL PROTECTED] wrote: Luis Lavena wrote: On this ticket: http://rubyforge.org/tracker/?func=detailatid=5145aid=10820group_id=1306 You can use PsExec tool [1] to simulate another user and remove administrative privileges for testing: Yes, it works with psexec. And it works running as the service user. If you have a look at my initial post, you can see the command line options I used for testing (nothing special here). The thing is that looking at the initial post: 6. Running the service with service user only in Users (or Power Users) group === DOES NOT WORK This make me think that running as user is not working, but the thing is is not actually working under LocalSystem account, I'm correct? can you provide me the cacls output form C:\rails\x folder? You can search the mailing list and other tickets that explain how to perform it (was discussed several times). Can you provide the 'sc queryex' and 'sc qc' for your service and pastie it here? C:\sc queryex rails3 SERVICE_NAME: rails3 TYPE : 10 WIN32_OWN_PROCESS STATE : 1 STOPPED (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)) WIN32_EXIT_CODE: 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0 PID: 0 FLAGS : C:\sc qc rails3 [SC] QueryServiceConfig SUCCESS SERVICE_NAME: rails3 TYPE : 10 WIN32_OWN_PROCESS START_TYPE : 3 DEMAND_START ERROR_CONTROL : 1 NORMAL BINARY_PATH_NAME : c:/ruby/bin/mongrel_service.exe single -e develop ment -p 3000 -a 127.0.0.1 -l log/mongrel.log -P log/mongrel.pid -c C:/rails /x -t 0 -r public -n 1024 LOAD_ORDER_GROUP : TAG: 0 DISPLAY_NAME : rails3 DEPENDENCIES : SERVICE_START_NAME : .\web SERVICE_START_NAME looks like web is the username used? C:\ I've just tested this on another, totally different machine: Windows XP Home Edition, German, Rails 2.1.0, restricted user account: No go. Parent Name: unknown. I made a test application when this was shown the first time, can you please try with it and provide me the output. Thanks, -- 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 proc_info_3.7z Description: application/7z-compressed ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] Mongrel as Windows service with normal privileges
On Thu, Jun 5, 2008 at 3:00 PM, Ingmar Stieger [EMAIL PROTECTED] wrote: [...] runas /user:web proc_info.exe *** CURRENT PROCESS *** EnumProcessModules (PID, name): 3904 proc_info.exe Module32First (PID, name): 3904 proc_info.exe GetProcessImageFileName (PID, name): 3904 \Device\HarddiskVolume5\Temp\proc_info .exe *** PARENT PROCESS *** EnumProcessModules (PID, name): 244 Error with OpenProcess GetLastError: 5Zugriff verweigert unknown Module32First (PID, name): 244Error Creating Snap (SNAPMODULE) GetLastError: 5Zugriff verweigert unknown GetProcessImageFileName (PID, name): 244 Error with OpenProcess GetLastError: 5Zugriff verweigert unknown Press Enter. Hmn, looks like user web user is too limited to do anything. Zugriff verweigert = Access denied. I think this confirms my suspicion that the normal user web may not query the parent process. What do you think ? How normal is normal? I mean, it can log in? it has applied some group policy stuff in it? Just for the sake of testing, can you create a limited account using the control panel and try running proc_info.exe with it? With that info maybe I can figure out what's wrong. Thanks for your time, -- 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] Mongrel as Windows service with normal privileges
On Wed, Jun 4, 2008 at 1:37 PM, Ingmar Stieger [EMAIL PROTECTED] wrote: I am trying to run Mongrel 1.1.5 with mongrel_service 0.3.4 on Ruby 1.8.6 with a normal user account, i.e. a user which belongs only to the Windows group Users. The rationale behind this is that running a web server with full administrative rights (e.g. Local System) is not something that I would like to do. Unfortunately, starting the service from the services control panel results in the following error message: The service did not respond to the start or control request in a timely fashion (the error comes up very quickly, maybe 1 second max). This happens only if the user the service is configured to run as does not belong to the Administrators group, otherwise it works fine. I have read a couple of threads about this subject, so this is what I have already tried: (With psexec -l cmd.exe:) 1. mongrel_rails start -e development -a 127.0.0.1 -p 3000 === WORKS 2. mongrel_service console single -e development -a 127.0.0.1 -p 3000 === WORKS (Interactively logged in as the service user:) 3. mongrel_rails start -e development -a 127.0.0.1 -p 3000 === WORKS 4. mongrel_service console single -e development -a 127.0.0.1 -p 3000 === WORKS 5. Running the service with service user in Administrator group === WORKS 6. Running the service with service user only in Users (or Power Users) group === DOES NOT WORK I had to change a couple of NTFS security settings in order to get it run with normal privileges. Now the only thing that still does not work is #6. Unfortunately, no log files are being generated, especially ServiceFB.log is nowhere to be found. The server is Windows Server 2003 Standard, by the way. 32bits or x64 editions? In any case, serviceFB.log and mongrel.log and mongrel_service.log should be stored into ruby/bin folder since was not possible by the service point to the directory of the service. I suggest you also try the psexec tool from Sysinternals and also runas program (builtin in Windows) to get more detail information. PATH reports from these environment will be help, also the security bits from the ACLs too, since if it runs as administrator maybe there is some file down there in your app (maybe log folder) that is not allowed to be written in it. Could anybody please enlighten me how I could further analyze this problem ? I followed the advise here in the list as far as I could, but now I am at a loss. It's hard to replicate all the environments, so please try go back to 0.3.3 which generates the servicefb.log file and see what it outputs. In any case, mongrel.log should always be generated. Thanks in advance, Ingmar HTH and please post your results so we can help you out. Regards, -- 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] leaking weirdness
On Mon, Apr 28, 2008 at 5:14 PM, Roger Pack [EMAIL PROTECTED] wrote: Previously posted on ruby talk. Response...silence :) Didn't saw that post, sorry. .. Perhaps someone out there can help give me a clue about the following situation: My mongrel processes seemed to be leaking. As an example of this, if I added this code to the bottom of environment.rb Thread.new {loop do; print 'w'; end} it didn't affect memory. At first. However after the web server got its first hit its memory consumption would sky-rocket. [i.e. it would monotonically grow by about 50MB/s] Then I ran the same scenario using webrick, instead of mongrel [1.1.3]. No leak. Then I'm thinking 'hmm maybe it's mongrel and the mongrel guys have fixed this.' Update my gem to 1.1.4 from 1.1.3. Using mongrel this time. No leak! Yea! Now this is the weird part. Attempted to recreate the bug. Uninstalled mongrel 1.1.4, reinstalled 1.1.3 uninstalled daemons [its dependency] 1.0.10, reinstalled 1.0.9 [what I had before]. Ran it with Mongrel again [which is where it used to leak]. No leak. I am so confused! Perhaps rubygems was updated and so it compiled it right this time? Note that there don't appear to be significant code changes in mongrel from 1.1.3 to 1.1.4, though there could be, I'm not sure. It's probably not even a mongrel problem. Maybe if somebody else who 'suspects' a memory leak could try my code and see if it leaks theirs, that would be well appreciated. The good news is that maybe updating rubygems and recompiling mongrel helps with memory leaks in rails apps. Thoughts? -R OS X PPC patchlevel 111 Did you upgraded rubygems at the time you updated mongrel from 1.1.3 to 1.1.4? Also, did you hit the same request/url during testing and recreating this bug? (just to be sure). I've seen lot of complains about my mongrel is eating my memory, but as Erza commented in his Rack Rails [1], it seems lot of stuff at Rails needs attention and lot of fixes, since they eat memory like a hungry baby... and is not directly fault of Mongrel. Could be Ruby, rubygems, some plugin you're using, even Rails :-P If you cannot revert back to the version of rubygems you was using to test the exact same environment, there is nothing more we can do except: thank god you got that solved! :-P Maybe you can see bleakhouse [2] and give it a whirl? [1] http://brainspl.at/articles/2008/04/25/hey-rails-nice-rack [2] http://blog.evanweaver.com/articles/2008/04/06/bleakhouse-4/ -- Luis Lavena Multimedia systems - 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] Go ahead and use Git
On Fri, Apr 25, 2008 at 12:44 PM, Zed A. Shaw [EMAIL PROTECTED] wrote: Hey, I heard a rumor that there's some FUD going around I won't let people on the Mongrel project use Git. Subversion blows, so go ahead and use Git if it makes people happy. Blame me, I used your comment as reference dealing with the repository code for One-Click Ruby Installer project. We have discussed that on our devel list here [1] and [2]. But I never said that you don't let us, just said that you don't want the svn repo moved into a closed source hosting facility/location. I actually never said you can't use Git. My objection previously was that Evan wanted to move the Subversion repository onto his own computers and off of RubyForge. This would have meant that Evan was in total control of the source, and while I trust him, it would have made people not trust the project. Mongrel has to be housed in a neutral location so that people can get at it no matter what disputes the team might have, and outside of any corporate or special interests. RubyForge is the only place that I (and others) trust, so keep there there. Outside of that, do as you want. I keep a bzr clone of mongrel repository here, and even the latest changes I made into stable are pushed thanks to bzr-svn integration. That's all. Now that RubyForge supports Git you can go to town on it and rock on. Oh, one thing to consider though is that Windows developers are screwed if you use Git. You would probably have to find a way to mirror in svn or get it working on windows. Consult with Luis about this since he knows more. I've been contributing back to DataMapper and a bit to rubinius using Git, so far, the msysGit team did a great work providing something that just works, have a few glitches, like svn did, but on average, is good. [1] http://rubyforge.org/pipermail/rubyinstaller-devel/2008-April/000302.html [2] http://rubyforge.org/pipermail/rubyinstaller-devel/2008-April/000306.html -- Luis Lavena Multimedia systems - 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] fastthread only needed on ruby =1.8
On Thu, Apr 17, 2008 at 11:31 AM, cdr [EMAIL PROTECTED] wrote: hey.. havent learned gemspec stuff yet, maybe someone who already knows can make the fastthread dep optional? fastthread is required for ruby version = 1.8.5, which is most stable one distributed across servers in the wild 1.8.6 with patchlevel higher than 36 ships with it, but is not widely installed. Latest code in stable branch make it optional. its just kind of annoying, since 'gem install mongrel' always breaks on 1.9, even tho mongrel works fine, Err, correction: if it compiles doesn't meant it works properly. You need to run the tests to see what it working and what isn't. plus 'gem install mongrel' doesnt even leave a local gem around to manually hack/install Can you rephrase? Maybe what you need is grab the sources from repository (svn) and hack yourself the need patches. plus there doesnt appear to be a 'gem fetch mongrel' gem fetch is a RubyGems functionality, not mongrels. plus mongrel.org is some domain squatter peddling links to dog supplies funny, you need to take a lok at this book then: http://rubyurl.com/EQlo so the bottom line is the user has to google for mongrel, dl a tarball, install manually Use SVN, is not powerful as Git (and all the git lovers) but works. Patches are welcome all cuz of some dep that isnt really a dep Is just me, my bad english or you don't spell english properly? -- Luis Lavena Multimedia systems - 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] [patch] RSTRING fixes for 1.9
On Thu, Apr 17, 2008 at 12:21 PM, cdr [EMAIL PROTECTED] wrote: doing what ebb did. change RSTRING(str)-ptr and RSTRING(str)-len to RSTRING_PTR(str) and RSTRING_LEN(str) and define a backwards-compatible macro.. i dont think i had to fix this before. maybe thin or something already had installed a working http11.so This is already fixed in Mongrel http://mongrel.rubyforge.org/changeset/895 maybe the mongrel parser should be its own package, since so much stuff uses it w/o the rest of mongrel? Mongrel HTTP parser is core of mongrel, it shouldn't be splitted. side note. mongrel.rubyforge trac doesnt use the same accts as toplevel rubyforge? (why im mailing this) No, RubyForge do not offer Trac functionality, after all RubyForge is GForge / SourceForge software (PHP) and not Python. Mongrel Trac is not hosted at rubyforge, even so, trac and GForge software cannot share authorization information (well, not without tweaking). -- Luis Lavena Multimedia systems - 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] Mongrel can't handle some URLs that IE6 sends
On Thu, Mar 27, 2008 at 7:24 PM, Dave Cheney [EMAIL PROTECTED] wrote: Sweet, when can I remove these lines from my nginx.conf ? Hold down a bit man, it just got into the code base ;-) Regards, -- Luis Lavena Multimedia systems - 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] Doesnt show log on command prompt
On Mon, Mar 24, 2008 at 4:55 AM, Vapor .. [EMAIL PROTECTED] wrote: I have latest version of mongrel installed. But when I run 'ruby script/server' it starts the server and shows nothing else, like development log it used to show on my previous dev machine. Are you expecting script/server dump information to the console? or in the log file? Any idea? Can you rephrase your question? Is not quite clear what are you getting and what are you expecting... Btw, if you plan to post from anonymous posting sites (like ruby-forum) at least provide a better alias than Vapor. -- Luis Lavena Multimedia systems - 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] mongrel garbage collection
On Mon, Mar 24, 2008 at 3:58 PM, Scott Windsor [EMAIL PROTECTED] wrote: Right now my current deployment configuration for all my rails applications is using apache + fastcgi. With this deployment strategy, if I don't set the garbage collection in my dispatch.fcgi, any rails application I use that uses image magick (for resizing/effects/etc) eats memory like a hog. In my dispatch... http://dev.rubyonrails.org/browser/trunk/railties/dispatches/dispatch.fcgi I usually set this to around 50 executions per gc run and my rails apps seem pretty happy. You're using *RMagick*, not ImageMagick directly. If you used the later (via system calls) there will no be memory leakage you can worry about. This has been working great for me thus far, but using mod_fastcgi leaves zombies processes occasionally during restart. Checking in with the docs, mod_fastcgi is more or less deprecated, and mod_fcgid is prefered. mod_fcgid has all sorts of issues (random 500s and the like), and to boot the documentation is quite poor. Moving from FastCGi to Mongrel will also require you monitor your cluster processes with external tools, since you're suing things that leak too much memory like RMagick and requires restart of the process. To make it clear: the memory leaked by RMagick cannot be recovered with garbage collection mechanism. I tried that several times but in the long run, required to restart and hunt down all the zombies processes left by Apache. So, I've decieded to move my apps over to using nginx with proxy with mongrel. The decsion to move the nginx is pretty minor (it's lighter weight and easier to configure), but my decision to move to mongrel warrented a bit of research. I do want to ensure that all of my applications behave properly in terms of memory consumption and the first thing I've noticed is that mongrel doesn't have the same options available for customizing when the GC runs. Can you tell me how you addressed the schedule of the garbage collection execution on your previous scenario? AFAIK most of the frameworks or servers don't impose to the user how often GC should be performed. This leads me to believe that either there's something specific to rails running under FastCGI that requires the GC to disabled/enabled during processes execution or mongrel hasn't implemented the feature yet. I'll bet is rails specific, or you should take a look at the fcgi ruby extension, since it is responsible, ruby-side, of bridging both worlds. On a personal note, I believe is not responsibility of Mongrel, as a webserver, take care of the garbage collection and leakage issues of the Vm on which your application runs. In any case, the GC of the VM (MRI Ruby) should be enhanced to work better with heavy load and long running environments. -- Luis Lavena Multimedia systems - 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] mongrel garbage collection
On Mon, Mar 24, 2008 at 4:59 PM, Scott Windsor [EMAIL PROTECTED] wrote: On Mon, Mar 24, 2008 at 12:18 PM, Luis Lavena [EMAIL PROTECTED] wrote: On Mon, Mar 24, 2008 at 3:58 PM, Scott Windsor [EMAIL PROTECTED] wrote: You're using *RMagick*, not ImageMagick directly. If you used the later (via system calls) there will no be memory leakage you can worry about. You're correct - I'm using 'RMagick' - and it uses a large amount of memory. But that's not really the overall point. My overall point is how to properly handle a rails app that uses a great deal of memory during each request. I'm pretty sure this happens in other rails applications that don't happen to use 'RMagick'. Yes, I faced huge memory usage issues with other things non related to image processing and found that a good thing was move them out of the request-response cycle and into a out-of-bound background job. So far, running the GC under fastcgi has given me pretty good results. The zombing issue with fast cgi is a known issue with mod_fastcgi and I'm pretty sure unrelated to RMagick or garbage collection. Yes, but even you reclaim the memory with GC, there will be pieces that wouldn't be GC'ed ever, since the leaked in the C side, outside GC control (some of the RMagick and ImageMagick mysteries). Can you tell me how you addressed the schedule of the garbage collection execution on your previous scenario? AFAIK most of the frameworks or servers don't impose to the user how often GC should be performed. In the previous scenario I was using fast_cgi with rails. In my previous reply I provided a link to the rails fastcgi dispatcher. http://dev.rubyonrails.org/browser/trunk/railties/dispatches/dispatch.fcgi In addtion, in other languages and other language web frameworks there are provisions to control garbage collection (for languages that have garbage collections, of course). I'll bet is rails specific, or you should take a look at the fcgi ruby extension, since it is responsible, ruby-side, of bridging both worlds. This is done in the Rails FastCGI dispatcher. I believe that the equivalent of this in Mongrel is the Mongrel Rails dispatcher. Since the Mongrel Rails dispatcher is distributed as a part of Mongrel, I'd say this code is owned by Mongrel, which bridges these two worlds when using mongrel as a webserver. Then you could provide a different Mongrel Handler that could perform that, or even a series of GemPlugins that provide a gc:start instead of plain 'start' command mongrel_rails scripts provides. On a personal note, I believe is not responsibility of Mongrel, as a webserver, take care of the garbage collection and leakage issues of the Vm on which your application runs. In any case, the GC of the VM (MRI Ruby) should be enhanced to work better with heavy load and long running environments. Ruby provides an API to access and call the Garbage Collector. This provides ruby application developers the ability to control when the garbage collection is run because in some cases, there may be an application-specific reason to prevent or explicity run the GC. Web servers are a good example of these applications where state may help determine a better time to run the GC. As you're serving each request, you're generally allocating a number of objects, then rendering output, then moving on to the next request. By limiting the GC to run in between requests rather than during requests you are trading request time for latency between requests. This is a trade-off that I think web application developers should deciede, but by no means should this be a default or silver bullet for all. My position is that this just be an option within Mongrel as a web server. --gc-interval maybe? Now that you convinced me and proved your point, having the option to perform it (optionally, not forced) will be something good to have. Patches are Welcome ;-) -- Luis Lavena Multimedia systems - 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] Mongrel Crashes in Production
On Tue, Mar 18, 2008 at 8:47 AM, James George [EMAIL PROTECTED] wrote: I have been getting this error on the production server after rails was updated to 2.0.2 and moreover this worked perfectly in the development mode. This crash occurs when no one is using the app for an hour or so. This is the error that I get in the logs. (nohup.out file). The production log doesnt show anything unusual. Please help me out guys. /usr/local/lib/ruby/gems/1.8/gems/mongrel-1.1.1/bin/../lib/mongrel/rails.rb:98:in `reload!': undefined method `reset_application!' for ActionController::Dispatcher:Class (NoMethodError) from It seems you're getting a restart/reload signal to the mongrel process, and it is trying to reload the Rails environment calling the reset_application! method of ActionController::Dispatcher There is no ActionController::Dispatcher, but there is a Dispatcher in the global namespace (::Dispatcher)? I cannot test it since Windows don't generate the HUP signal required for this, but I think I'm in the good path. HTH, -- Luis Lavena Multimedia systems - 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] Transfer-Encoding: Chunked
On Feb 15, 2008 9:53 PM, ry dahl [EMAIL PROTECTED] wrote: With out a content-length set in the request, everything is treating the content length as 0 and the file is more or less getting sent to the bit bucket. I think http://merb.devjavu.com/ticket/121 might have some useful hints too. Oh, got lost, there is merb.devjavu.com and also merb.lighthouseapp.com ? :-P -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] garbage collection patch
On Feb 6, 2008 12:46 AM, Roger Pack [EMAIL PROTECTED] wrote: Would it make sense to add the option for mongrel to disable GC during a request and enable it after? Or even run it after? Just thinking out loud. You're talking about mongrel, or mongrel_rails? The thing with that will be force garbage collection on every request will hit (and hard) the performance of the server. Also, is not Mongrel job if the framework behind it (in this case, Rails) generate so many objects that cross 8M limit set by VM (which usually trigger GC collection). There was a patch submitted a few days back to ruby-core about Benchmark.realtime that reduce memory allocation and increase performance. The problem was Rails use it extensively on every place and several times *per request*, eating memory and reducing performance... Just my comments :-) -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] mongrel_service install error
On Jan 30, 2008 4:35 AM, Vapor .. [EMAIL PROTECTED] wrote: when I run 'gem install mongrel_service'..it gives following error... Building native extensions. This could take a while... ERROR: Error installing mongrel_service: ERROR: Failed to build gem native extension. c:/ruby/bin/ruby.exe extconf.rb install mongrel_service checking for RegisterServiceCtrlHandlerEx()... no checking for EnumServicesStatusEx()... no checking for QueryServiceStatusEx()... no creating Makefile it seems you're running version 0.9.5 of RubyGems, please update to 1.0.1 and uninstall the offending gems. I've described this issue in a blog post: http://blog.mmediasys.com/2007/12/19/latest-rubygems-and-rails-is-a-deadly-combo/ And a few times on ruby-talk: http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/a594343b8ada2cc3 HTH, -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] ERROR RUNNING 'service::install'
On Jan 24, 2008 7:07 AM, Chris Gers32 [EMAIL PROTECTED] wrote: Hi, I'm trying to start a Mongrel (1.1.3) Server, running as a Windows Service, via mongrel_rails service::install -N FDS_Server_4001 -p 4001 -e production But I get the following error message : ERROR RUNNING 'service::install': Plugin /service::install does not exist in category /commands I never had this problem before (Win XP, Vista), until I tried installing on a Win 2003 Server ; I don't know if it's related... Does anyone know what causes this? A search in Google for this error message yields nothing... What version of mongrel_service are you installing? if you do just mongrel_rails only, you will see the list of available commands, I bet you will have a windows::service::install set of commands instead of just service::install This was due some changes in the win32-service gem introduced in 0.6.x series. This issue was fixed in latest (0.3.4) release of mongrel_service. gem install mongrel_service -v '0.3.4' HTH, -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] [SOLVED] Re: ERROR RUNNING 'service::install'
On Jan 24, 2008 1:24 PM, Chris Gers32 [EMAIL PROTECTED] wrote: Luis Lavena wrote: This issue was fixed in latest (0.3.4) release of mongrel_service. gem install mongrel_service -v '0.3.4' You're right: I upgraded mongrel_service and now see the service::install command. Unfortunately, I got a new error message when I tried creating the Mongrel Service: C:\web\FDS_Servermongrel_rails service::install -N FDS_Server_4001 -p 4001 -e production c:/ruby/lib/ruby/site_ruby/1.8/rubygems.rb:379:in `report_activate_error': Could not find RubyGem win32-service (= 0.5.2, 0.6.0) (Gem::LoadError) Finally, installing win32-service 0.5.2 did the trick... But the current version is 0.6.1 ; will mongrel_service be compatible with it in the future? mongrel_service only use win32-service to register/unregister the service. Is not possible maintain compatibility with both releases 0.5.x or 0.6.x due some API changes. The dependency on win32-service is planned to be removed completely. -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] [ANN] Ebb Web Server
On Jan 22, 2008 1:00 PM, ry dahl [EMAIL PROTECTED] wrote: I see what you're saying but unfortunately without numbers on the ordinate -- specifically without knowing where zero is -- it's impossible to evaluate even the relative differences. Oh yeah, sorry, zero is at the the bottom. yes, the graph could be clearer.. below is my data - each line is an average of multiple runs of ab with -n 1000. Great data Ry, thanks for it. For sake of completeness, can you compare it with plain mongrel? (in truth, i avoid exposing my numbers because i'm a bit embarrassed of my ancient computer. i think if you run them on a modern computer, these numbers will be in the thousands.) You shouldn't! I was doing the first test compatibility for mongrel back in 2006 from a P3 800Mhz 512MB RAM computer! Not mention that first version of mongrel_service was created on that computer! So: don't be hard on you ;-) -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] [ANN] Ebb Web Server
On Jan 21, 2008 6:34 PM, ry dahl [EMAIL PROTECTED] wrote: Hey All, Just one more quick message to entice contributors to take a look at Ebb. I was able to run some preliminary benchmarks for the first time today against evented Mongrel and Thin. They're all running a small Camping application through Rack. http://s3.amazonaws.com/four.livejournal/20080121/ebb.png Hey ry, did you tweaked the HttpParser like Thin guy did? I was thinking about the modifications he did: He removed all the if conditions evaluating http_field, request_method, request_uri and others (most the ones that are allocated/initialized in HttpParser_alloc). But since I couldn't find time to ask it in a separate mail, is time that boost the question using your thread ;-) The code for that benchmark (and chart generation) can be found in the Ebb repo: http://repo.or.cz/w/ebb.git?a=commit;h=c2fecde0a04603727949ec0b05d694be89a464d2 svn mirror is coming, right? :-D -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] [ANN] Ebb Web Server
On Jan 21, 2008 7:00 PM, Kevin Williams [EMAIL PROTECTED] wrote: On Jan 21, 2008 1:55 PM, Luis Lavena [EMAIL PROTECTED] wrote: Hey ry, did you tweaked the HttpParser like Thin guy did? I was thinking about the modifications he did: He removed all the if conditions evaluating http_field, request_method, request_uri and others (most the ones that are allocated/initialized in HttpParser_alloc). I don't think those conditions were *removed*, I think they were *moved*, but I've only glanced at the C code and would barely know what I was looking at anyway. :) No, he removed them: http://pastie.caboo.se/141633 The ragel code will generate the http11_parser.c file, and http11.c file defines all the functions pointers: http11.c:207..225: VALUE HttpParser_alloc(VALUE klass) { VALUE obj; http_parser *hp = ALLOC_N(http_parser, 1); TRACE(); hp-http_field = http_field; hp-request_method = request_method; hp-request_uri = request_uri; hp-fragment = fragment; hp-request_path = request_path; hp-query_string = query_string; hp-http_version = http_version; hp-header_done = header_done; http_parser_init(hp); obj = Data_Wrap_Struct(klass, NULL, HttpParser_free, hp); return obj; } Theory indicates that allocation happens way before the ragel code is getting executed, so there is no need to evaluate the conditions all the time, ending with a speed boost. -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users
Re: [Mongrel] [ANN] Ebb Web Server
On Jan 21, 2008 7:46 PM, ry dahl [EMAIL PROTECTED] wrote: svn mirror is coming, right? :-D Hi Luis, I'll put it on github when they open (or another service?) Apparently their svn bridge isn't fully functional yet. What you can do is ask for a rubyforge project and use the svn available there as mirror. I'm still waiting to get bzr-git with write support so I can use bazaar all the way :-) -- Luis Lavena Multimedia systems - A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams ___ Mongrel-users mailing list Mongrel-users@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-users