Merb 0.0.5
Posted by ezmobius Thu, 02 Nov 2006 03:00:00 GMT
Merb 0.0.5 is released in gem form. This release adds the following niceties:
- ActiveRecord migrations.
- Merbjs ajax template handlers
- Layouts for templates
- Merb IRB console
- X-SENDFILE header support
- Rendering partial templates with partial(:posts)
- Improved Routing
- New Daemonizing code
- Built in merb_cluster support for starting multiple instances
- Quite a few code and documentation improvements
Merb is moving pretty fast but it is getting to the point where it makes it pretty easy to make standalone web apps. It also plays nice with rails as a little secret weapon to speed up parts of your app and as well for file uploads. It is very surprising how much functionality I have been able to fit in 420 lines of code ;)
Feedback and feature requests are welcome as always.
Searching...





Hi, howabout to add X-Accel-Redirect ( http://wiki.codemongers.com/NginxXSendfile) header support for nginx ;-)
Hi, I have this crazy idea of running merb under LiteSpeed. Is it even possible? I'm going to give it a try today if I have time but was wondering if it was even possible to run it under the LSAPI.
It may be possible but I am really not sure. I haven't used lightspeeds lsapi directly. If you want to have a go at it then by all means let me know what you find. The place where you will have to ty into lsapi is in lib/merb/merb_handler.rb. But be warned its called Merb for a reason. And that reason is that its pretty tied to mongrel in its current state. It does not rely at all on cgi.rb though and does all its own multi part parsing. I don't think it would require too much work to make it work with lightspeed. Let me know if you get it working and maybe I will consider making the server it runs on configurable so you could use webrick, fcgi or lightspeed. But I am more then ahppy with the performance right now on mongrel. Ranging from 300-700 req/sec for dynamic and 1000+ for static files, merb is a little speed demon.
@ al-
Ok I just added nginx_send_file method which will use the X-Accel_Redirect header to let nginx serve the file. just use it as the last statement in your controller action:
nginx_send_file('/path/to/file.whatever')
Ezra, Thanks for the info. I did not end up having time for a full try but I was able to look at the source and figured I need to dig into merb_handler.rb. My biggest draw to the LSAPI is that it handles adding/removing processes by itself and I don't have to worry about my mongrel processes running or not. See, I'm really lazy ;-) I will keep looking to see if I can figure it out. Thanks again, AEM
Ezra -- I just tried to send you email via your email address at the Yakima Herald, and was blocked by their spam filter. I wanted to talk with you about a potential project. Could you email me? Feel free to delete this comment. Regards, Steve de Brun
Sorry to be slamming you with this, but it looks like you're basically done with a rails plug-in called "cells". I found a reference to it here: http://article.gmane.org/gmane.comp.lang.ruby.rails/94394 I just downloaded it and I'm playing with it, and I really think I want to run with cells, but am just a bit nervous about its future. Do you have any thoughts about the plug-in? Would you recommend anyone use it? Do you have any plans on releasing it more formally? I'd offer my help, but I'm very new to ruby and rails...
Just a quick note, you might want to change the cells plug-in so it does not fail if there is nothing in /app/cells, or if /app/cells does not exist.
re: the sample app, does merb create the tables or do we have to create them?
Okay, I think I figured it out, you have to do the following steps: 1. Create a database called 'merb' 2. run "rake db:migrate" command in the sample_app/dist directory Now when you start merb it should find the necessary tables alright.