Hello Folks, This is the long awaited release of the Mongrel HTTP library that supports *Ruby On Rails*. I know tons of people have been waiting for it, so I''ve got a few things to lay down first before you get all excited: 1) It''s very very ALPHA support for Rails. It will run a Rails app, and runs my simple apps, but it''s not fast or correct as it needs to be. 2) It should work for win32 people who can build it, but it won''t become a service. Run it in a cmd window. 3) I did this release late at night so we know how well those hold up. :-) Otherwise, please punish it like crazy for me. == Getting The Goods You can grab Mongrel via: * Project Page -- http://rubyforge.org/projects/mongrel/ * Docs Page -- http://mongrel.rubyforge.org/ You can also install using RubyGems with: > sudo gem install mongrel And of course you need to have a compiler installed for it to build just like before. No new C code has been included so if you built it before then you can build it now. If you can''t build it then let me know and I''ll help you out. You can also go to the project page''s Files section to grab source .tgz files if you like to install with setup.rb and source. == Running Ruby On Rails The Rails support is done through a small script called mongrel_rails. This script kicks up all the gear needed for your application, hooks it into Mongrel, and then goes into daemon mode (if you install the daemons gem). If you install with RubyGems then you should get the mongrel_rails command as well. You can then run it with: > cd myapp > mongrel_rails 0.0.0.0 3000 It will write any errors to log/mongrel.log and put it''s PID into log/ mongrel-3000.pid. You can kill it with: > kill -TERM `cat log/mongrel-3000.pid` You should then be able to hit your local web server and see your Rails application run. If it don''t then send me your mongrel.log. Another thing to do is if you get a URL giving you the wrong mime type then let me know. If you get a malformed response then send me the result of doing: > curl -i http://localhost:3000/the/bad/uri == Big Changes * URIClassifier had an error in the prefix based search such that "/" wasn''t getting resolved. Fixed this up and cleaned it. * DirHandler now supports many more needed features such as mime type mapping, serving index.html if present, getting the paths right on "/" mounted directories, and allowing others to ask if a DirHandler can serve a file. All of this was so that Mongrel can run a Rails app with no external support. * Fixed a problem with Error404Handler which caused an explosion. * Implemented the mongrel_rails server so people can start working with Rails and Mongrel. == Next Release I''ll be focusing on making the Rails support tight as hell and squeezing out every ounce of performance possible. This will include making my dream caching mechanism. I''ll also look at the next nail in the CGI library''s coffin: multi- part mime decoding and handling uploaded files. I''m setting my sights next on CGI as the library to take down. Anyone interested in helping on this should contact me. Enjoy the release and send me your bug reports. Zed A. Shaw http://www.zedshaw.com/
dmarko@tcl-digitrade.com
2006-Feb-10 08:07 UTC
[Rails] [ANN] Mongrel 0.3 -- Runs Ruby On Rails
On my Gentoo Linux with Ruby 1.8.4 it says: nick app1 # mongrel_rails 192.168.0.40 3000 /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'': no such file to load -- daemons/daemonize (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' from /usr/lib/ruby/gems/1.8/gems/mongrel-0.3/bin/mongrel_rails:5 from /usr/bin/mongrel_rails:18 Do I need some additional module to run it? David Marko -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060210/7ee10db2/attachment.html
On 2/10/06, dmarko@tcl-digitrade.com <dmarko@tcl-digitrade.com> wrote:> > On my Gentoo Linux with Ruby 1.8.4 it says: > > nick app1 # mongrel_rails 192.168.0.40 3000 > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require__'': no such file to load -- daemons/daemonize (LoadError) > from > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require'' > from > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3/bin/mongrel_rails:5 > from /usr/bin/mongrel_rails:18 > > > Do I need some additional module to run it?gem install daemons (if you are using gems) maybe will help. See also: [ http://rubyforge.org/projects/daemons ]
On 2/10/06, dmarko@tcl-digitrade.com <dmarko@tcl-digitrade.com> wrote:> > On my Gentoo Linux with Ruby 1.8.4 it says: > > nick app1 # mongrel_rails 192.168.0.40 3000 > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require__'': no such file to load -- daemons/daemonize (LoadError) > from > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in > `require'' > from > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3/bin/mongrel_rails:5 > from /usr/bin/mongrel_rails:18 > > > Do I need some additional module to run it? > > David Marko > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >Same error, OS X Tiger. -- Kyle Maxwell Chief Technologist E Factor Media // FN Interactive kyle@efactormedia.com 1-866-263-3261
I also tried installing the daemonize library at http://grub.ath.cx/daemonize/, changing the require call from ''daemons/daemonize'' to just ''daemonize'', and it required ok, but for some reason, still couldn''t find the method...
I''m setting up ror on windows and will be using iis... does anyone have the "ruby for iis" installer? the http://rubyforiis.sosukodo.org/ site is down... if anyone has the installer please email me. any help would be appreciated. best regards, Erwin Quita
Looks like it isn''t recovering if you don''t have daemons gem installed. Do: gem install daemons. Then it should be fine. Zed A. Shaw http://www.zedshaw.com/ On Feb 10, 2006, at 3:30 AM, Kyle Maxwell wrote:> On 2/10/06, dmarko@tcl-digitrade.com <dmarko@tcl-digitrade.com> wrote: >> >> Do I need some additional module to run it? >> >> >> >> > > Same error, OS X Tiger.
Hi Zed, nice work, I was just going to attempt setting up Mongrel and see if I could have a go making it work Rails when I saw your email, you made my day... I''ve just tried the release 0.3 on windows with Ruby 1.8.4, compiled fine and works fine in solo mode. I''ve then tried it with an existing Rails app. It also works fine however it doesn''t want to serve any pictures at all, here''s what I get when I try to access a PNG located in /Image in Firefox "The image "http://127.0.0.1/images/device-red.png" cannot be displayed, because it contains errors." The source of this is: ?PNG Any idea why that is? Any text files such as javascript sources, css works fine but images dont, I''ve tried with JPG and all I get is the name of the image but not the image. Gael
I''m on Windows XP, ruby 1.8.2 (2004-12-25) [i386-mswin32]. mongrel gem installed daemons gem installed Created fresh rails app and tried to run it via mongrel. C:\rails\test>mongrel_rails 0.0.0.0 3000 c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3/bin/mongrel_rails:57: uninitialized c onstant Mongrel (NameError) from c:/ruby/bin/mongrel_rails:18:in `load'' from c:/ruby/bin/mongrel_rails:18 C:\rails\test> Any ideas? On 2/10/06, Zed Shaw <zedshaw@zedshaw.com> wrote:> > Hello Folks, > > This is the long awaited release of the Mongrel HTTP library that > supports *Ruby On Rails*. I know tons of people have been waiting > for it, so I''ve got a few things to lay down first before you get all > excited: > > 1) It''s very very ALPHA support for Rails. It will run a Rails app, > and runs my simple apps, but it''s not fast or correct as it needs to be. > 2) It should work for win32 people who can build it, but it won''t > become a service. Run it in a cmd window. > 3) I did this release late at night so we know how well those hold > up. :-) > > Otherwise, please punish it like crazy for me. > > > == Getting The Goods > > You can grab Mongrel via: > > * Project Page -- http://rubyforge.org/projects/mongrel/ > * Docs Page -- http://mongrel.rubyforge.org/ > > You can also install using RubyGems with: > > > sudo gem install mongrel > > And of course you need to have a compiler installed for it to build > just like before. No new C code has been included so if you built it > before then you can build it now. If you can''t build it then let me > know and I''ll help you out. > > You can also go to the project page''s Files section to grab > source .tgz files if you like to install with setup.rb and source. > > > == Running Ruby On Rails > > The Rails support is done through a small script called > mongrel_rails. This script kicks up all the gear needed for your > application, hooks it into Mongrel, and then goes into daemon mode > (if you install the daemons gem). If you install with RubyGems then > you should get the mongrel_rails command as well. You can then run > it with: > > > cd myapp > > mongrel_rails 0.0.0.0 3000 > > It will write any errors to log/mongrel.log and put it''s PID into log/ > mongrel-3000.pid. You can kill it with: > > > kill -TERM `cat log/mongrel-3000.pid` > > You should then be able to hit your local web server and see your > Rails application run. If it don''t then send me your mongrel.log. > Another thing to do is if you get a URL giving you the wrong mime > type then let me know. If you get a malformed response then send me > the result of doing: > > > curl -i http://localhost:3000/the/bad/uri > > > == Big Changes > > * URIClassifier had an error in the prefix based search such that "/" > wasn''t getting resolved. Fixed this up and cleaned it. > * DirHandler now supports many more needed features such as mime type > mapping, serving index.html if present, getting the paths right on > "/" mounted directories, and allowing others to ask if a DirHandler > can serve a file. All of this was so that Mongrel can run a Rails > app with no external support. > * Fixed a problem with Error404Handler which caused an explosion. > * Implemented the mongrel_rails server so people can start working > with Rails and Mongrel. > > > == Next Release > > I''ll be focusing on making the Rails support tight as hell and > squeezing out every ounce of performance possible. This will include > making my dream caching mechanism. > > I''ll also look at the next nail in the CGI library''s coffin: multi- > part mime decoding and handling uploaded files. I''m setting my > sights next on CGI as the library to take down. Anyone interested in > helping on this should contact me. > > Enjoy the release and send me your bug reports. > > Zed A. Shaw > http://www.zedshaw.com/ > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Brian Lauer <http://fozbaca.org/> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060210/558e4516/attachment.html
I''m pretty sure you need Ruby 1.8.4 for this, because Mongrel uses ''readpartial'', which was added in 1.8.3. On 2/10/06, Brian Lauer <fozbaca@gmail.com> wrote:> I''m on Windows XP, ruby 1.8.2 (2004-12-25) [i386-mswin32]. > mongrel gem installed > daemons gem installed > > Created fresh rails app and tried to run it via mongrel. > > C:\rails\test>mongrel_rails 0.0.0.0 3000 > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3/bin/mongrel_rails:57: > uninitialized c > onstant Mongrel (NameError) > from c:/ruby/bin/mongrel_rails:18:in `load'' > from c:/ruby/bin/mongrel_rails:18 > > C:\rails\test> > > Any ideas? > > > On 2/10/06, Zed Shaw <zedshaw@zedshaw.com> wrote: > > Hello Folks, > > > > This is the long awaited release of the Mongrel HTTP library that > > supports *Ruby On Rails*. I know tons of people have been waiting > > for it, so I''ve got a few things to lay down first before you get all > > excited: > > > > 1) It''s very very ALPHA support for Rails. It will run a Rails app, > > and runs my simple apps, but it''s not fast or correct as it needs to be. > > 2) It should work for win32 people who can build it, but it won''t > > become a service. Run it in a cmd window. > > 3) I did this release late at night so we know how well those hold > > up. :-) > > > > Otherwise, please punish it like crazy for me. > > > > > > == Getting The Goods > > > > You can grab Mongrel via: > > > > * Project Page -- http://rubyforge.org/projects/mongrel/ > > * Docs Page -- http://mongrel.rubyforge.org/ > > > > You can also install using RubyGems with: > > > > > sudo gem install mongrel > > > > And of course you need to have a compiler installed for it to build > > just like before. No new C code has been included so if you built it > > before then you can build it now. If you can''t build it then let me > > know and I''ll help you out. > > > > You can also go to the project page''s Files section to grab > > source .tgz files if you like to install with setup.rb and source. > > > > > > == Running Ruby On Rails > > > > The Rails support is done through a small script called > > mongrel_rails. This script kicks up all the gear needed for your > > application, hooks it into Mongrel, and then goes into daemon mode > > (if you install the daemons gem). If you install with RubyGems then > > you should get the mongrel_rails command as well. You can then run > > it with: > > > > > cd myapp > > > mongrel_rails 0.0.0.0 3000 > > > > It will write any errors to log/mongrel.log and put it''s PID into log/ > > mongrel-3000.pid. You can kill it with: > > > > > kill -TERM `cat log/mongrel-3000.pid` > > > > You should then be able to hit your local web server and see your > > Rails application run. If it don''t then send me your mongrel.log. > > Another thing to do is if you get a URL giving you the wrong mime > > type then let me know. If you get a malformed response then send me > > the result of doing: > > > > > curl -i http://localhost:3000/the/bad/uri > > > > > > == Big Changes > > > > * URIClassifier had an error in the prefix based search such that "/" > > wasn''t getting resolved. Fixed this up and cleaned it. > > * DirHandler now supports many more needed features such as mime type > > mapping, serving index.html if present, getting the paths right on > > "/" mounted directories, and allowing others to ask if a DirHandler > > can serve a file. All of this was so that Mongrel can run a Rails > > app with no external support. > > * Fixed a problem with Error404Handler which caused an explosion. > > * Implemented the mongrel_rails server so people can start working > > with Rails and Mongrel. > > > > > > == Next Release > > > > I''ll be focusing on making the Rails support tight as hell and > > squeezing out every ounce of performance possible. This will include > > making my dream caching mechanism. > > > > I''ll also look at the next nail in the CGI library''s coffin: multi- > > part mime decoding and handling uploaded files. I''m setting my > > sights next on CGI as the library to take down. Anyone interested in > > helping on this should contact me. > > > > Enjoy the release and send me your bug reports. > > > > Zed A. Shaw > > http://www.zedshaw.com/ > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > Brian Lauer > <http://fozbaca.org/> > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
If you do find this, please share... I need it too! Brian On Friday, February 10, 2006, at 5:03 PM, Erwin Quita wrote:>I''m setting up ror on windows and will be using iis... > >does anyone have the "ruby for iis" installer? > >the http://rubyforiis.sosukodo.org/ site is down... > >if anyone has the installer please email me. > >any help would be appreciated. > >best regards, > >Erwin Quita >_______________________________________________ >Rails mailing list >Rails@lists.rubyonrails.org >http://lists.rubyonrails.org/mailman/listinfo/rails-- Posted with http://DevLists.com. Sign up and save your time!
It might be the mime type mapping i just did, but i''ll try this out and see what is up. What''s weird is the stock "Your on Rails" index.html has an image which shows up just fine, so maybe it''s a windows thing? Do you possibly have "device-red.PNG" on the filesystem, but are referencing it via "device-red.png"? That would mess with the mime-type mapping. Zed A. Shaw http://www.zedshaw.com/ On Fri, Feb 10, 2006 at 03:46:02PM +0100, Gael Pourriel wrote:> "The image "http://127.0.0.1/images/device-red.png" cannot be > displayed, because it contains errors." >
On Fri, Feb 10, 2006 at 10:51:18AM -0500, Brian Lauer wrote:> I''m on Windows XP, ruby 1.8.2 (2004-12-25) [i386-mswin32].<snip>> > C:\rails\test>mongrel_rails 0.0.0.0 3000 > c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3/bin/mongrel_rails:57: > uninitialized c > onstant Mongrel (NameError) > from c:/ruby/bin/mongrel_rails:18:in `load'' > from c:/ruby/bin/mongrel_rails:18This looks like an older version of mongrel.rb is floating around your system. Do a scan for mongrel.rb and http11.dll (or is it .so) and remove them. Additionally, do a gem uninstall mongrel and tell it to uninstall all versions. Finally, be careful that you don''t have an unrelated "mongrel.rb" file floating around in your local directory. Zed A. Shaw http://www.zedshaw.com/
On Fri, Feb 10, 2006 at 10:55:32AM -0500, Wilson Bilkovich wrote:> I''m pretty sure you need Ruby 1.8.4 for this, because Mongrel uses > ''readpartial'', which was added in 1.8.3. >Yes, this is true. Zed A. Shaw http://www.zedshaw.com/
Yes you need 1.8.4, wont work with 1.8.2, had the load error too... On 10/02/06, Zed Shaw <zedshawc@pizarro.dreamhost.com> wrote:> On Fri, Feb 10, 2006 at 10:55:32AM -0500, Wilson Bilkovich wrote: > > I''m pretty sure you need Ruby 1.8.4 for this, because Mongrel uses > > ''readpartial'', which was added in 1.8.3. > > > > Yes, this is true. > > Zed A. Shaw > http://www.zedshaw.com/ > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
No I''ve checked and the file is called device-red.png not PNG, any images wont display at all, I''ve tried the default rails app and I dont see the Rails logo, just the "You''re on Rails" text. GIF display but corrupted, PNG and JPG wont show at all Using XP and Ruby 1.8.4 (mswin32) On 10/02/06, Zed Shaw <zedshawc@pizarro.dreamhost.com> wrote:> It might be the mime type mapping i just did, but i''ll try this out and > see what is up. What''s weird is the stock "Your on Rails" index.html > has an image which shows up just fine, so maybe it''s a windows thing? > Do you possibly have "device-red.PNG" on the filesystem, but are > referencing it via "device-red.png"? That would mess with the mime-type > mapping. > > Zed A. Shaw > http://www.zedshaw.com/ > > On Fri, Feb 10, 2006 at 03:46:02PM +0100, Gael Pourriel wrote: > > "The image "http://127.0.0.1/images/device-red.png" cannot be > > displayed, because it contains errors." > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
On Feb 9, 2006, at 11:54 PM, Zed Shaw wrote:> Otherwise, please punish it like crazy for me.Zed, this is so cool! Attached is a patch to add getoptlong support for --help and --daemon. I had the daemons gem installed, but wanted to run in the foreground, just like script/server. Patch applies cleanly via patch -p0 < mongrel_rails.patch from within the bin/ directory of the gem. -- -- Tom Mornini -------------- next part -------------- A non-text attachment was scrubbed... Name: mongrel_rails.patch Type: application/octet-stream Size: 2016 bytes Desc: not available Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060210/f84cc09b/mongrel_rails.obj -------------- next part --------------
Does anyone know the performance or scalability of Rails on Windows/IIS? I really want to know the issues of running Rails on Windows, since most of my servers are Windows. And as far as I test, running PHP on Windows/IIS is really slow and crashy compared to linux. Does Rails share the same characterictic too? TIA. -- Tirta K. Untario On 10 Feb 2006 17:54:31 -0000, brian ketelsen <devlists-rubyonrails@devlists.com> wrote:> If you do find this, please share... I need it too! > > Brian > > On Friday, February 10, 2006, at 5:03 PM, Erwin Quita wrote: > >I''m setting up ror on windows and will be using iis... > > > >does anyone have the "ruby for iis" installer? > > > >the http://rubyforiis.sosukodo.org/ site is down... > > > >if anyone has the installer please email me. > > > >any help would be appreciated. > > > >best regards, > > > >Erwin Quita > >_______________________________________________ > >Rails mailing list > >Rails@lists.rubyonrails.org > >http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > Posted with http://DevLists.com. Sign up and save your time! > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
OK Zed, I''ve fixed it. Under windows you have to specify binary mode when opening the files. Replacing: open(req, "r") do |f| out.write(f.read) end by: open(req, "rb") do |f| out.write(f.read) end Sort the images not displaying under windows. On 10/02/06, Gael Pourriel <gael.pourriel@gmail.com> wrote:> No I''ve checked and the file is called device-red.png not PNG, any > images wont display at all, I''ve tried the default rails app and I > dont see the Rails logo, just the "You''re on Rails" text. > > GIF display but corrupted, PNG and JPG wont show at all > > Using XP and Ruby 1.8.4 (mswin32) > > > > On 10/02/06, Zed Shaw <zedshawc@pizarro.dreamhost.com> wrote: > > It might be the mime type mapping i just did, but i''ll try this out and > > see what is up. What''s weird is the stock "Your on Rails" index.html > > has an image which shows up just fine, so maybe it''s a windows thing? > > Do you possibly have "device-red.PNG" on the filesystem, but are > > referencing it via "device-red.png"? That would mess with the mime-type > > mapping. > > > > Zed A. Shaw > > http://www.zedshaw.com/ > > > > On Fri, Feb 10, 2006 at 03:46:02PM +0100, Gael Pourriel wrote: > > > "The image "http://127.0.0.1/images/device-red.png" cannot be > > > displayed, because it contains errors." > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > >
On Feb 10, 2006, at 11:45 AM, Tom Mornini wrote:> On Feb 9, 2006, at 11:54 PM, Zed Shaw wrote: > >> Otherwise, please punish it like crazy for me. > > Zed, this is so cool! > > Attached is a patch to add getoptlong support for > --help and --daemon.Yikes! Apparently I made some ''improvements'' before creating the patch, thereby making myself look silly in public. Apologies for the bogus patch. Attached is the corrected patch. -- -- Tom Mornini -------------- next part -------------- A non-text attachment was scrubbed... Name: mongrel_rails.patch Type: application/octet-stream Size: 2060 bytes Desc: not available Url : http://wrath.rubyonrails.org/pipermail/rails/attachments/20060211/56ad400a/mongrel_rails.obj -------------- next part --------------
Could you describe this caching mechanism in more detail? Zed Shaw wrote:> > == Next Release > > I''ll be focusing on making the Rails support tight as hell and > squeezing out every ounce of performance possible. This will include > making my dream caching mechanism. > > I''ll also look at the next nail in the CGI library''s coffin: multi- > part mime decoding and handling uploaded files. I''m setting my > sights next on CGI as the library to take down. Anyone interested in > helping on this should contact me. > > Enjoy the release and send me your bug reports. > > Zed A. Shaw > http://www.zedshaw.com/-- Posted via http://www.ruby-forum.com/.
On 10/02/06, Zed Shaw <zedshaw@zedshaw.com> wrote:> Looks like it isn''t recovering if you don''t have daemons gem > installed. Do: gem install daemons. > > Then it should be fine.Can you add that as a dependency? Oh, you did :) -- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/
Hi Gael, Sorry I missed this, it''ll be in the 0.3.2 release shortly. Zed On 2/10/06 6:17 PM, "Gael Pourriel" <gael.pourriel@gmail.com> wrote:> OK Zed, I''ve fixed it. Under windows you have to specify binary mode > when opening the files. > > Replacing: > > open(req, "r") do |f| > out.write(f.read) > end > > by: > open(req, "rb") do |f| > out.write(f.read) > end > > Sort the images not displaying under windows. >