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/
on 2006-02-10 08:54
on 2006-02-10 09:07
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
on 2006-02-10 09:28
On 2/10/06, dmarko@tcl-digitrade.com <dmarko@tcl-digitrade.com> wrote: > /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 2006-02-10 09:30
On 2/10/06, dmarko@tcl-digitrade.com <dmarko@tcl-digitrade.com> wrote: > /usr/lib/ruby/gems/1.8/gems/mongrel-0.3/bin/mongrel_rails:5 > > > Same error, OS X Tiger. -- Kyle Maxwell Chief Technologist E Factor Media // FN Interactive kyle@efactormedia.com 1-866-263-3261
on 2006-02-10 09:46
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...
on 2006-02-10 09:58
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
on 2006-02-10 14:18
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 2006-02-10 15:46
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
on 2006-02-10 16:51
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 2006-02-10 16:55
I'm pretty sure you need Ruby 1.8.4 for this, because Mongrel uses 'readpartial', which was added in 1.8.3.
on 2006-02-10 19:07
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 2006-02-10 19:09
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:18 This 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 2006-02-10 19:10
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/
on 2006-02-10 20:03
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 2006-02-10 20:45
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.
on 2006-02-10 23:21
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
on 2006-02-11 00:17
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 2006-02-11 03:27
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.
on 2006-02-11 08:21
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/
on 2006-02-13 11:22
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/
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.