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

By Peter Cooper / November 10, 2009

rubies2Welcome to the latest installment in the series of compilation posts summarizing some of my latest findings in the world of all things Ruby. Let’s tackle those links..

Alchemist: Easy Unit Conversion in Ruby

Alchemist is a new Ruby library that aims to take the pain out of performing translation with day to day units, such as miles, kilograms, kelvin, meters, and becquerels. There are a few ways you can perform conversions such as explicitly with a method: 8.meters.to.miles or inline: 10.kilometers + 1.mile. The library’s source code is quite something to look at – there are units I’ve never even heard of before. Read More

By Ric Roberts / November 5, 2009

jekyllJekyll is a simple Ruby-powered static site generator, originally by Tom Preston-Werner (aka mojombo) of Github fame. It’s focused around blogging, but it can be configured to generate any kind of static site. (Note: Jekyll has been around for about a year – Tom originally blogged about it in November last year, so apologies if this is old news to some readers, but I’ve only recently discovered it!)

Because Jekyll outputs a static site structure, it means you can host your blog (or site) from anywhere that you can serve static HTML, simply by using your favourite web server (e.g. Read More

By Peter Cooper / November 3, 2009

thinkfunc.pngThinking Functionally in Ruby is a talk that British Ruby developer Tom Stuart gave at a recent London Ruby Users Group meeting. In it he covers what functional programming is, why it’s a “pretty neat idea,” and how to adopt functional programming principles in Ruby. Skills Matter took a video of the entire 47 minute presentation (it’s embedded on the right hand side of that page – Flash required.. just been told it might be limited to UK visitors only, if so get the original MP4 file) but there’s also a 110 page PDF (1.5MB download) you should have to hand too (with Tom’s slides). Read More

By Ric Roberts / October 31, 2009

JustinRiot is a new Ruby test framework by Justin Knowlden that focuses on faster testing. Justin was frustrated with his slow running test suites, despite employing techniques such as using factories, mocks and avoiding database access. He realized that a slow-running suite makes one reluctant to run it or expand it – not good.

With Riot, each test consists of a block which forms a single assertion on the topic of the test, keeping the tests focused. Tests run in a specific context, and the setup code is only run once per context, further contributing to the speed of your test suite, and unlike some Ruby test frameworks, such as Shoulda, that rely on or are based on Test::Unit, Riot has taken a new approach for speed purposes. Read More

By Peter Cooper / October 28, 2009

heroku.pngHeroku is a Ruby webapp hosting service that we first mentioned about two years ago. It started off as an online IDE of sorts, but is now a complete cloud platform for running Ruby webapps. You can develop locally and then, with a single command, deploy your app to their metered service. Well, Heroku got in touch with me last week to talk about their new “Add-Ons” feature and they’ve really kicked things up a notch for people wanting to quickly roll out webapps online.

Till now, Heroku has provided basic functionality on a semi-metered basis. You pay a monthly fee for a basic rate of service and then pay an hourly rate for more concurrency. Read More

By Peter Cooper / October 26, 2009

rubygems.pngJust two months ago we posted about Gemcutter, a new RubyGem hosting repository that, we said, was “taking aim at RubyForge and GitHub.” It only took six weeks for GitHub to give up on building gems and to start recommending Gemcutter instead. Today, RubyForge is toppled also. Gemcutter developer Nick Quaranto has announced that Ruby Central has given the thumbs up to replacing http://gems.rubyforge.org/ with http://rubygems.org/ (the new Gemcutter URL) as the default gem host in RubyGems.

The transition from RubyForge to Gemcutter/RubyGems.org isn’t an overnight deal and gem publishing from RubyForge will continue to work for the time being, but within the next couple of months, RubyForge accounts will be merged with Gemcutter and an update will be made to change the canonical gem source (though, of course, you can use Gemcutter already if you like by following their instructions). Read More

By Peter Cooper / October 22, 2009

boson.pngBoson is a new command/task framework for Ruby by Gabriel Horner (of Hirb fame). Gabriel seems to be trying to supersede Rake, the Ruby “make” equivalent, and from first glance Boson seems to provide many benefits from the “reinvent the wheel” philosophy.

Anyone who’s built a Rakefile knows it’s not the most straightforward syntax, so Boson’s approach of using regular Ruby code in the shape of methods added to a module is refreshing. Tasks are methods, methods are tasks – simple. Within these methods, you can use the options helper method and passed arguments to access command line options and other data. Read More

By Peter Cooper / October 14, 2009

rack-logo.pngIf you’ve worked with Web apps using Ruby, you might know of Rack, an interface that sits between Ruby applications and HTTP-speaking Web servers. All of the major Ruby frameworks and server setups use it now, including Rails. Middleware (in Rack) is code that manipulates data going back and forth between your Ruby apps and the HTTP server. You can use middleware to intercept requests, change data in mid-flow, etc. Ryan Bates has a great screencast tutorial if you’re new to the concept and want to build your own.

P.S. I know the term “middlewares” sounds borderline insane, but.. it works, you know what it means – yada, yada ;-)

In this post, we’re going to highlight various Rack middlewares from CodeRack, an on-going Rack middleware competition:

Karma Chameleon – Focused at Rails developers, Karma Chameleon makes it easy to automatically have file extensions added to all of your app’s links and URLs. Read More

By Peter Cooper / October 12, 2009

socket.pngEgyptian Ruby developer Muhammed Ali (of MySQLPlus fame) has released the first draft of a “Ruby 1.9.x Web Servers” booklet. It looks at how different HTTP daemons and server libraries (Thin, Passenger, WEBrick and Mongrel) perform in Ruby 1.9.1. You can read the book for free on his site or on Scribd, but if you want to download a PDF to view locally you’ll need to have a free Scribd account, alas.

As of this first draft, the e-book’s 60 pages long – resulting in about 50 pages of actual content. It’s clearly a draft, but Mohammed has put together a pretty readable overview of the state of not only Web servers but basic TCP servers and concurrency issues on Ruby 1.9. Read More

By Peter Cooper / October 10, 2009

begruby-edition-2-cover.gif A few days ago I received the latest in a long line of royalty statements for my book, Beginning Ruby (as published by Apress). Long time readers might recall that Ruby Inside was started principally to promote the book, but turned into so much more that the book took a back seat. Well, the whim came over me to share the murky details of being the author of such a book, including how the royalty statements work (or not), how much is earned, sales figures, and so forth.

So I wrote What I’ve Earned (And Learned) From Writing “Beginning Ruby” over at the new, official Beginning Ruby promotional site. Read More

By Ric Roberts / October 7, 2009

mustacheMustache is a new templating library from Chris Wanstrath (a.k.a. defunkt of GitHub fame) that provides a way to render views in your chosen Ruby web framework. Influenced by ctemplate, Mustache helps to keep your MVC layers separate by actively preventing the inclusion of application logic in your views.

With Mustache, the typical view layer is split up into two sub-layers: a Ruby Class-based “view” and an HTML “template”, so you can concentrate on crafting your HTML without polluting it with embedded Ruby logic. This separation also makes it easier to test your view-code.

Amusingly, the name of the project comes from the way that you insert references to the view class into the template. Read More

By Andy Atkinson / October 6, 2009

windycityrails.png The 1-day WindyCityRails conference happened again this year, this time in downtown Chicago at the Westin Hotel on September 12. Reviews were generally positive with the conference sessions balancing immediately-useful Ruby and Rails tips with related concepts like functional programming and design. All of the main track sessions were professionally recorded and are available through the official website, though I’ve linked to each of them individually below as well:

Better Ruby through Functional Programming by Dean Wampler – Dean Wampler is author of Programming Scala. He introduced functional programming concepts and how to implement them in Ruby.

Super-easy PDF Generation with Prawn and Prawnto by John McCaffrey – PDF generation is a complex feature and John described various types and recommended particular tools for each type. Read More

By Peter Cooper / October 5, 2009

ruby-inside-design-transition.gifThey’ve had several days to settle in, but because most of you will be reading via the RSS feed it’s time to make a point to announce that… Ruby Inside and Rails Inside have both been redesigned! If you usually just read the full-text RSS feed, do come and visit the site – if only to let us know what you think.

The new design marks the 3rd major redevelopment of Ruby Inside since 2006 and the stats from the last week are showing it to be a lot more effective with a 40% increase in pageviews per visitor. As well as an improved design, new features include:

  • An extended “elsewhere” section with automatically updated links to other top Ruby content each day
  • Our listing of the “Top 10 Ruby Sites” on every page’s sidebar (Wanna know what they are?
  • Read More

By Peter Cooper / October 3, 2009

rubypulse.pngRubyPulse is a screencast site that publishes regular videos about different Ruby libraries. It’s a month old so far and German Ruby developer Alex Peuchert has put out 9 episodes already. With a little support, perhaps Alex will be able to keep it going and become the pure Ruby equivalent of Ryan Bates!

Each RubyPulse episode is in Quicktime format and about 4 minutes long – each is also available in an iPod/iPhone tailored format. The nine episodes of RubyPulse so far include:

  • FastRI – A look at the performance-focused alternative to the “ri” command line tool.
  • Memoize – An overview of memoization in Ruby (the process of caching method responses for future use).
  • Read More

By Peter Cooper / September 30, 2009

rubymine2.pngRubyMine is a Ruby and Rails IDE (for Windows, OS X, and Linux) by JetBrains, the guys behind the popular Java IDE IntelliJ IDEA. We’ve previously posted about how much people seem to like RubyMine, and it looks like things will get even better, as they’ve just released the beta of RubyMine 2.0. Notably, RubyMine 2.0 will be free to existing 1.0 users as it falls within the year allowed for free updates!

The New Stuff

RubyMine 2.0 was initially meant to only be RubyMine 1.5 but Eugene Toporov of JetBrains told me that they’ve considered 2.0 to be more appropriate given the number of updates and additions. Read More

Recently Popular Posts