Merb 0.0.7 Released
Posted by ezmobius Thu, 30 Nov 2006 03:44:00 GMT
I have just released Merb 0.0.7 as a gem. The docs are updated at:
Here is the changelog:
* added respond_to * added json POST body to be parsed into params * added configurable log level * added before filters. :symbols or Proc's * added :include and :exclude hashes to before filters. * merb cluster works better. pid files work with monit * added merb_drb_server * added drb session container * added support for mongrel_upload_progress * added nginx_send_file and send_file methods * improved dispatching speed. * keep mime parsing and route recorgnition out of mutex * only mutex around places that can call ActiveRecxord objects. * Improved memory profile with fastthread * uses fson if installed falls back to json * added basic auth module and filters. * changed default template extensions to .herb .jerb and .xerb for html, js and xml * added many helpers * add start of framework specs built with rspec
I hope to have some real tutorials RealSoon Now™. Enjoy!
Searching...





Dear Ezra, Really looking forward to your Xen tutorial post! Sincerely, Lazyweb ;P
Merb got mentioned on the 2nd day of the Ruby 2006 Advent Calendar (http://www.rubyinside.com/advent2006/2-erubis.html). I was intrigued by Peter Cooper's description of merb as a mini-framework and eventually and eventually made my way to Ezra's article titled "Merb is useable and a gem" (http://brainspl.at/articles/2006/10/18/merb-is-useable-and-a-gem). I tried to install merb following the directions in the article, but due to errors, never got past "gem install merb". Here's what ruby and gems report about my environment settings: C:\> ruby -v ruby 1.8.5 (2006-08-25) [i386-mswin32] C:\> gem environment Rubygems Environment: - VERSION: 0.9.0 (0.9.0) - INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8 - GEM PATH: - C:/Ruby/lib/ruby/gems/1.8 - REMOTE SOURCES: - http://gems.rubyforge.org I try and install merb-0.0.7.gem remotely by doing the following: C:\> gem install merb ERROR: While executing gem ... (Zlib::BufError) buffer error Hmmm...that's pretty useless. So let's try again with debugging info: C:\> gem install --include-dependencies --traceback --debug merb Exception `Errno::ENOENT' at C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:50 - No such file or directory - C:\Documents and Settings\easye/.gemrc Exception `LoadError' at C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 - no such file to load -- sources Exception `Zlib::BufError' at C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:613 - buffer error ERROR: While executing gem ... (Zlib::BufError) buffer error C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:613:in `initialize' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:613:in `new' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:613:in `zipped_stream' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:588:in `each' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:445:in `each_entry' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:439:in `loop' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:439:in `each_entry' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:424:in `each' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:586:in `each' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/format.rb:62:in `from_io' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:579:in `open_from_io' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:801:in `open_from_io' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/format.rb:59:in `from_io' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/format.rb:47:in `from_file_by_path' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:62:in `install' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/remote_installer.rb:444:in `install' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:258:in `execute' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:220:in `each' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:220:in `execute' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:69:in `invoke' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:117:in `process_args' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:88:in `run' C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:29:in `run' C:/Ruby/bin/gem.bat:24 removing D:/Temp/open-uri.2524.0...done The comments around line 613 in C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb look interesting and I'm curious about which version of zlib is installed on my machine: C:\> ruby -e 'require "zlib"; p Zlib::ZLIB_VERSION' "1.2.3" Odd. On the chance that something got corrupted while fetching the merb-0.0.7.gem file remotely, I manually downloaded the gem file and tried to install locally. Same errors as above. After some googling, things eventually got resolved by doing the following: 1. Download merb-0.0.7.gem 2. Rename merb-0.0.7.gem to merb-0.0.7.tar 3. Untar merb-0.0.7.tar using... tar -xvf merb-0.0.7.tar 4. Decompress the 2 files (data.tar.gz and metadata.gz) that were untarred using... gunzip *.gz 5. Compress the 2 files that were untarred using... gzip -9 data.tar metadata 6. Tar the 2 files (data.tar.gz and metadata.gz) using... tar -cf merb-0.0.7.gem *.gz 7. Install gem locally using... gem install -l merb-0.0.7.gem Hope that helps others. Ed
Wow, no formatting in the previous post. Re-posting with HTML formatting this time. Sorry...
Merb got mentioned on the 2nd day of the Ruby 2006 Advent Calendar (http://www.rubyinside.com/advent2006/2-erubis.html). I was intrigued by Peter Cooper's description of merb as a mini-framework and eventually and eventually made my way to Ezra's article titled "Merb is useable and a gem" (http://brainspl.at/articles/2006/10/18/merb-is-useable-and-a-gem). I tried to install merb following the directions in the article, but due to errors, never got past "gem install merb".
Here's what ruby and gems report about my environment settings:
C:\> ruby -v
ruby 1.8.5 (2006-08-25) [i386-mswin32]
C:\> gem environment
Rubygems Environment:
- VERSION: 0.9.0 (0.9.0)
- INSTALLATION DIRECTORY: C:/Ruby/lib/ruby/gems/1.8
- GEM PATH:
- C:/Ruby/lib/ruby/gems/1.8
- REMOTE SOURCES:
- http://gems.rubyforge.org
I try and install merb-0.0.7.gem remotely by doing the following:
C:\> gem install merb
ERROR: While executing gem ... (Zlib::BufError)
buffer error
Hmmm...that's pretty useless. So let's try again with debugging info:
C:\> gem install --include-dependencies --traceback --debug merb
Exception `Errno::ENOENT' at C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:50 - No such file or directory - C:\Documents and Settings\easye/.gemrc
Exception `LoadError' at C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27 - no such file to load -- sources
Exception `Zlib::BufError' at C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:613 - buffer error
ERROR: While executing gem ... (Zlib::BufError)
buffer error
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:613:in `initialize'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:613:in `new'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:613:in `zipped_stream'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:588:in `each'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:445:in `each_entry'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:439:in `loop'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:439:in `each_entry'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:424:in `each'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:586:in `each'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/format.rb:62:in `from_io'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:579:in `open_from_io'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb:801:in `open_from_io'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/format.rb:59:in `from_io'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/format.rb:47:in `from_file_by_path'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/installer.rb:62:in `install'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/remote_installer.rb:444:in `install'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:258:in `execute'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:220:in `each'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/gem_commands.rb:220:in `execute'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/command.rb:69:in `invoke'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:117:in `process_args'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/cmd_manager.rb:88:in `run'
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/gem_runner.rb:29:in `run'
C:/Ruby/bin/gem.bat:24
removing D:/Temp/open-uri.2524.0...done
The comments around line 613 in C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/package.rb look interesting and I'm curious about which version of zlib is installed on my machine:
C:\> ruby -e 'require "zlib"; p Zlib::ZLIB_VERSION'
"1.2.3"
Odd. On the chance that something got corrupted while fetching the merb-0.0.7.gem file remotely, I manually downloaded the gem file and tried to install locally. Same errors as above. After some googling, things eventually got resolved by doing the following:
1. Download merb-0.0.7.gem
2. Rename merb-0.0.7.gem to merb-0.0.7.tar
3. Untar merb-0.0.7.tar using...
tar -xvf merb-0.0.7.tar
4. Decompress the 2 files (data.tar.gz and metadata.gz) that were untarred using...
gunzip *.gz
5. Compress the 2 files that were untarred using...
gzip -9 data.tar metadata
6. Tar the 2 files (data.tar.gz and metadata.gz) using...
tar -cf merb-0.0.7.gem *.gz
7. Install gem locally using...
gem install -l merb-0.0.7.gem
Hope that helps others.
Ed
Thanks, Ed! I had the same problem with the 0.0.7 version, and didn't even think to re-tar the files in the gem. Regards, Ron
I am loving on the Merb! I think I will start a series of Merb posts on my blog...here is the first entry: http://deadprogrammersociety.blogspot.com/2006/12/merb-is-word.html Thanks for some good Merb, Ezra! Ron