MagLev Alpha Released: A New, Scalable Ruby Implementation »
Created at: 21.11.2009 04:20, source: Ruby Inside, tagged: Cool Linux Specific News OS X Specific Tools
MagLev is a new(ish) Ruby implementation built by Gemstone Systems that focuses on providing an integrated object persistence layer and a distributed shared cache - a truly scalable Ruby implementation. Maglev has, however, had an air of vaporware about it, having been hyped up in early 2008 and only available to a small group of alpha testers till now. That changes today with the first public, alpha release!
Back in early 2008, MagLev program manager Bob Walker did an interview with InfoQ about the project where he said that 8 people were working on MagLev, so this is a pretty big deal for them. Developer Avi Bryant then did a short presentation at RailsConf 2008 where he gave a comprehensive overview of what MagLev is along with some live demonstrations.
Why Should You Care?
In short, MagLev is cool for a few reasons. Two key ones being that 1) MagLev runs on the SmallTalk virtual machine which, it is claimed, should yield significant performance increases for a language like Ruby, and 2) a MagLev environment allows multiple Ruby processes over multiple machines (if you wish) to use the same objects simultaneously for easy scalability. Avi's video is great if you want to get a grasp on it:
MagLev presentation at RailsConf 2008 from Monty Williams on Vimeo.
Developer Monty Williams is keen to stress that this is an alpha, not a beta, so you can't expect it to run Rails or any gems that require C extensions. That said, it does run Sinatra, Rack, and RubyGems, plus a significant effort has been put into passing the RubySpec, so it's not as if it's a crippled implementation as such.
If you want to learn more, consider following the MagLev team on Twitter @MagLev and checking out the official mailing list "maglev-discussion."
Installation (i.e. getting to an irb prompt that works)
Bear in mind that MagLev will only work on 64 bit versions of OS X, Linux, and Solaris, so if you're in the 32 bit club, there's no point in going any further (yet).
If you download the MagLev Installer script (small ZIP file), you can run the installMaglev.sh script and install the latest version like so:
./installMaglev.sh 22578
The announcement post doesn't make it clear you need to provide a version number of what version number to provide. 22578 was mentioned earlier in the day though, and it seems to work.
Once installed, MagLev provides some info about environment variables you need to add to your .bashrc or .bash_profile. Follow these, then open a new terminal and here's how you get to an irb session:
$ maglev start
startnetldi[Info]: Starting GemStone network server "gs64ldi".
startnetldi[Error]: could not start server
startstone[Info]: Starting Stone repository monitor "maglev".
startstone[Info]: GemStone server 'maglev' has been started.
$ maglev-irb
irb(main):001:0> 20 + 20
=> 40
irb(main):002:0> exit
error , SystemExit Error, nil,
during /Users/peter/Downloads/MagLev-installer/MagLev-22578.MacOSX/bin/maglev-irb
SystemExit Error, nil
Alternatively: GitHub installation
MagLev is also available from GitHub to clone. To install MagLev from GitHub:
git clone git://github.com/MagLev/maglev.git cd maglev ./install.sh
.. then follow the note about adding the path to your .bashrc or .bash_profile and running Rake in a new prompt (though still under the maglev project directory).
If you get any further with doing something interesting like, say, getting an IRB prompt up successfully on this, do post a comment ;-)
[ad] Find duplication, code smells, complex code and more in your Ruby code with Caliper! The metrics are free and setup takes just one click. Get started!
more »
Retrospectiva: Open Source Project Management Rails App »
Created at: 18.11.2009 02:09, source: Rails Inside, tagged: Miscellaneous Tools
Retrospectiva is a new open-source project management tool built as a Rails application. It's interesting from two angles: first, as a project management tool, as it was designed; but secondly as a large, well built Rails 2.3 app to learn from.
Retrospectiva is a solid example of a rare sort of open source Rails project: one that's well presented, user friendly, and solidly developed. It has a well designed homepage with lots of screenshots and feature guides, and there's even a single step installation process so you can get up and running from a single line at your Terminal. Give it a shot:
wget -O - http://retrospectiva.org/download/script/remote/retrospectiva_installer.rb | ruby
Note: If you have an error like
undefined method `destroy' for #Svn::Ext::Core::Apr_pool_wrapper_toccur, then download the above installer, go into the newly createdretrospectivadirectory and addSCM_SUBVERSION_ENABLED = falseas the first line inconfig/environment.rb. Then runretrospectiva_installer.rbdirectly and installation will complete. I found this necessary to complete on OS X Snow Leopard.
more »
Jammit: Industrial Strength Asset Packaging for Rails Apps »
Created at: 17.11.2009 17:26, source: Rails Inside, tagged: plugins Tools
Earlier this year on Ruby Inside, we wrote about Sprockets - a Ruby library from 37signals that could take the various JavaScript files used in your project and compress them down on the fly into smaller portions to be more easily sent over the wire. Now, however, say hello to Jammit, an "industrial strength" asset packaging library for Rails that handles not only JavaScript, but also CSS and inline images.
Asset packaging is nothing new, but Jammit has an unusual feature in that it can take small images used on your site and embed them into your CSS file using the data-uri mechanism. The benefit is that you reduce the number of files that need to be downloaded to render a single page - significant as most browsers have a limit to the number of files they can retrieve simultaneously from the same host.

Jammit has a well designed GitHub hosted homepage that goes into how to install it (just install a gem, add the reference to environment.rb, and add a route into config/routes.rb), set it up to take note of your assets (all done via a YAML file), and get things running in your views (add some helpers to your main layout), so refer to that for further details.
[ad] Find duplication, code smells, complex code and more in your Ruby code with Caliper! The metrics are free and setup takes just one click. Get started!
more »
Spree: Open Source E-commerce for Rails Apps Gets Even Better »
Created at: 12.10.2009 19:50, source: Rails Inside, tagged: Elsewhere plugins Tools
Back in September 2008, we posted about Spree, an open source Rails e-commerce platform that was then in its infancy. Now, however, Spree is truly flying. New versions are coming out frequently and there are more and more established sites using it to provide e-commerce functionality. Spree also just made it into GitHub's top 10 forked projects this week.
So why post about it again here? Well, our readership has grown a lot in the last year and Spree is a strong open source project that's both incredibly useful and worth knowing about in case you have a need for it in the future.
For those who are totally new to Spree, there's a live demo at http://demo.spreecommerce.com/ and an extensive list of features here. Spree has come a long way in the last year - give it a look!
more »
