Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Author Archives: Peter Cooper

By Peter Cooper / October 27, 2007

Ruby-Heap
In “How the Ruby heap is implemented,” Hongli Lai looks at how Ruby manages its memory and stores your objects. It’s reasonably technical but a very interesting read for those with the stomach for it. Read More

By Peter Cooper / October 27, 2007

Mpruby
A few weeks ago, Peter Vanbroekhoven of the newly formed Belgian Ruby User Group gave a presentation called Metaprogramming in Ruby (video and slides available). Peter looks at some of the metaprogramming voodoo used by libraries like ActiveRecord and looks at how to create domain specific languages of your own. Read More

By Peter Cooper / October 25, 2007

Leoparddisk20070611

Someone / some people who have been responsible for integrating Ruby and Rails into the latest version of Mac OS X (Leopard) have written some notes on what was involved and how Ruby and Rails work in Leopard. The Ruby build is a customized 1.8.6 p36 and actually integrates into Xcode and Interface Builder.. now making it a relatively easy task to put together Ruby GUI apps on OS X. RubyGems is also installed with a smattering of the most popular gems preinstalled by default. Read More

By Peter Cooper / October 23, 2007

Note: Ruby Inside service will be slow until Thursday as I’m on vacation. The flow will then return to regular levels! Thanks!Sinatra – A New Ruby Web App FrameworkIt’s still in its infancy but Sinatra is an interesting looking new Ruby Web app framework. It relies very heavily on a custom DSL but is otherwise in a similar niche to Merb or Camping.PackR – Ruby JavaScript CompressionPackR is a port of a Javascript compressor originally developed by Dean Edwards. The interesting thing about PackR is that it comes as a Rails plugin to enable you to have the JavaScripts associated with your Rails apps “packed” on the fly. Read More

By Peter Cooper / October 18, 2007

Trap

Mailtrap is a “dummy” SMTP server developed in Ruby by Matt Mower. The main use for Mailtrap is to act as an SMTP server that runs locally and can be sent mail which can be inspected for debugging purposes. For example, your Rails application running locally might need to send mail using ActionMailer, and while you want it to go through all of the SMTP motions, you don’t want the mail to really be sent.. enter Mailtrap! In this blog post, Matt goes into more details about how Mailtrap works, why it’s a good idea, and the motivation behind its development. Read More

By Peter Cooper / October 17, 2007

Reading Excel Files From RubyWe Heart Code posts a tutorial showing how to use the Parseexcel library, a port of a Perl library that lets you parse Excel spreadsheets from your code.How To Debug Your Rails App With ruby-debugPatrick Lenz presents a great article that shows how to debug a Rails application from start to finish.Economical Use of Amazon S3 with Ruby on RailsRobert Dempsey has written a comprehensive article on how to use S3 in an economic, efficient way from Ruby on Rails applications.Ruby on Rails vs ColdFusion CommercialThe ever active RailsEnvy guys have produced their eighth Ruby on Rails vs X commercial.. Read More

By Peter Cooper / October 16, 2007

Ryan Bates is being a total champ in rolling out more and more consistently good Rails related screencasts for free at RailsCasts.com. Some of the latest include:

Adding an Environment – Rails comes with three environments: development, test, and production. But, you aren’t restricted to just these. You can add your own! See how in this episode.

Testing Controllers – Controllers are tricky to test, and there’s no perfect way to do it. In this episode you will see how I test controllers, and my reasoning behind it.

Custom Routes – In this episode you will learn how to add custom routes, make some parameters optional, and add requirements for other parameters. Read More

By Peter Cooper / October 15, 2007

Sexycharts

Matt Aimonetti has put together a solid tutorial with code examples showing how to build “sexy charts” in a Rails app in a surprisingly short amount of time (although 5 minutes might be pushing it unless you’re a cut and paste champion). Read More

By Peter Cooper / October 12, 2007

Gltail

glTail is a great little Ruby script by Erlend Simonsen (aka Fudgie) that uses OpenGL and Ruby to visualize the events taking place in log files in real time. An example video on the official site shows requests coming into an HTTP server, each represented by a “ball” which is thrown across the screen. The script uses net-ssh to connect to a server and then libopengl-ruby to output the graphics. Parsers are included for processing Apache, Rails, IIS and Postfix log files. Nice work! The code is merely a couple hundred lines of Ruby, so if you’ve fancied putting together a basic OpenGL app, it’s worth looking at it for that reason too. Read More

By Peter Cooper / October 11, 2007

CplusRuby is a new library by Michael Neumann that makes it really easy (as in, even easier than RubyInline, although CplusRuby is of a smaller scope) to define custom C structures from within Ruby. The major goal of CplusRuby is performance, and the ability to easily define small methods within a class that compile to C and which can call each other directly. An example is always better than an explanation, so check out this code. Read More

By Peter Cooper / October 10, 2007

1526492612 4379F79Ee8

“Those Rails Envy guys from the Rails Vs Whatever commercials” are back again with a new project. Called, simply, the Rails Envy Podcast, Jason Seifer and Gregg Pollack discuss the weekly happenings in the Rails world. Taking the completely opposite approach to the Rails Podcast, with its interviews and indepth discussions, the Rails Envy Podcast flies through Rails’ headline news in just several minutes. They’re already on episode 2 and are publishing a new episode each Tuesday. The Pragmatic Studio sponsors the show.

As an aside, they’re also selling all of the Rails vs Whatever commercials on DVD and also have a new Rails vs .NET commercial to show. Read More

By Peter Cooper / October 9, 2007

Getting Started with Rubinius Interested in what’s going on with Rubinius, the new virtual machine and Ruby compiler created by Evan Phoenix? Want to install it and have a play on your own machine? Someone’s put together a great blog post called “Getting started with Rubinius” that runs through checking out Rubinius, compiling it, and digging into the code. Premailer.web – Ruby app that brings all CSS styles inlinePremailer.web is a Ruby script (and Web service) by Alex Dunae that can take an HTML file that uses external CSS files and turn it into an HTML file with all its styles declared inline. Read More

By Peter Cooper / October 7, 2007

Olabini

Ola Bini is one of the core team of developers working on JRuby and the author of Practical JRuby on Rails Web 2.0 Projects, announced separately here on Ruby Inside. In conjunction with the launch of the book, I wanted to ask Ola some questions about his involvement with JRuby, how he used his knowledge to write the book, and where JRuby’s future is heading from here.

Ruby Inside: What areas of JRuby have you taken responsibility for? Do you tend to work directly with other team members or have you focused on areas that most interest you?

Ola Bini: Well, I’ve done much work on the surrounding parts of JRuby – things like ActiveRecord-JDBC for example. Read More

By Peter Cooper / October 7, 2007

Jrubyonrails-1

Practical JRuby on Rails Web 2.0 Projects: Bringing Ruby on Rails to Java is a new book by Ola Bini, a core member of the JRuby development team, and published by Apress. In its 330 pages it covers pretty much everything you need to know about deploying Rails applications on the JRuby platform and how to take advantage of the different technologies JRuby makes available to you (JDBC, JMX, Tomcat, Enterprise Java Beans, etc.) As well as covering the technologies and concepts involved, the book also walks the reader through developing and deploying a few different Rails applications from scratch. You can buy a PDF version of the book from Apress for $21.50 or the usual print version from Amazon.com for $28.37. Read More

By Peter Cooper / October 7, 2007

Actsasconference

acts_as_conference is a Rails conference taking place in Orlando, Florida on February 8 and 9, 2008, and a pretty good excuse for getting out of the cold weather up north for a couple of days. It’s currently early days in the organization of the conference, so no speakers have been announced and a call for proposals is due soon. The conference is being organized by Robert Dempsey, also known for his work on Rails For All and Atlantic Dominion Solutions. Read More