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

Author Archives: Peter Cooper

By Peter Cooper / September 21, 2006

This month’s “Troll of the Month” is Ruby vs Python – why no-one should care by Cynos. Cynos touches on a point I’ve seen raised a few times in the past month.. namely that Python and Ruby are similar and are, supposedly, ‘converging’. He argues, therefore, that both communities should stop evangelizing to each other. Despite a reasonable, if baited, argument, however, the comments quickly turn into a pointless flamewar:

- and when you unfairly malign nice people because of the programming language that they use [...] that I can only assume you’re a born again Ruby user

- I don’t really care about either language, but if I had to pick one I’d go with Python. Read More

By Peter Cooper / September 20, 2006

The Rails Forum has announced a Rails Tutorial contest:

To celebrate our 500 member mark obtained yesterday, and in the interest of getting more good Ruby on Rails tutorials, Rails Forum is giving away an iPod shuffle to the best tutorial written between now and 12:01 AM GMT on November 1, 2006!

What do I need to do to enter?

Simple! Just post a tutorial in our Ruby on Rails Tutorials forum between now and the time above, and you’ll be automatically entered!

To learn more, read the announcement post. If any good tutorials end up on there, I’ll be posting references to them here on Ruby Inside.. Read More

By Peter Cooper / September 20, 2006

Mnlrb

Mr. Neighborly (a.k.a. Jeremy McAnally) has just released his “Humble Little Ruby Book“, a Ruby book available in both e-book (PDF) and print formats. The book is a bargain basement $5 as a PDF or $10 in print! Much like Why’s Poignant Guide, the Humble Little Ruby Book is written in a conversational style and has a real ‘atmosphere’ about it. It covers the Ruby language from the very basics through to creating useful and functional programs. Read More

By Peter Cooper / September 18, 2006

Railsforumbuttons-1

Kelli has posted four different Rails buttons on the Ruby on Rails Forum (shown above) that you can use anywhere you like.

In the same spirit, I’ve put together four “Ruby Inside” graphics you can also use where you like. They’re not ads for this blog, so you don’t have to link back to here with them (though you can if you like!) but they’re more to demonstrate that Ruby is in action on whatever you use them against. Like “Intel Inside”, etc.

Big JPEG:
Rubylogo

Big PNG (transparent – will work on any color background):
Rubylogo

Small JPEG:
Rubylogosmall

Small PNG (transparent):
Rubylogosmall Read More

By Peter Cooper / September 17, 2006

Actsascachedshot
acts_as_cached is a plugin by Chris Wanstrath, Tim Myrtle, and PJ Hyett that simply allows you to cache any Ruby object in memory (using memcached). Check out the documentation for the full instructions, but if you’ve got a working memcached server ready and waiting, it’s as easy as installing a gem (memcached-client), a plugin (acts_as_cached), and adding ‘acts_as_cached’ to your model.

Chris gives a full run down of acts_as_cached in this blog post, and also links to a great PDF presentation about the plugin. Read More

By Peter Cooper / September 16, 2006

Railsconfeu2006

DHH has put together a great round-up of RailsConf Europe 2006 that took place over the last couple of days. He also announces that RailsConf Europe 2007 will be in Berlin, Germany. Read More

By Peter Cooper / September 15, 2006

Newrubysite

A few readers have e-mailed in pointing out the new official Ruby site’s design. It’s a great bit of work, but I tend not to post about things that everyone’s almost certainly read somewhere else, and I linked to a preview of the new design some time back. However, I just noticed they’ve mentioned Ruby Inside as one of only four Ruby ‘blogs of note’. As a thanks for this great honor, I realized I should probably post about the site, so go enjoy it. Read More

By Peter Cooper / September 15, 2006

Ajaxscaffolding

Richard White quotes an anonymous user of his AJAX scaffolding system for Rails:

I really like Ajax Scaffold but it’s really hard to upgrade when a new version comes out. I usually spend a couple hours diffing all my scaffolds with a newly generated one.

Richard listened, and no longer are you forced to use AJAX Scaffold as a code generator.. it’ll now work as a regular Rails plugin! Richard has more information here. Nice work, Richard! Read More

By Peter Cooper / September 14, 2006

Ryan Daigle writes about resource_feeder, a new plugin for Ruby on Rails that makes the generation of RSS and Atom feeds easy. Like so:

def rss
render_rss_feed_for Post.find(:all, :order => ‘created_at DESC’, :limit => 10)
end

If you want to get playing straight away: Read More

script/plugin install simply_helpful
script/plugin install resource_feeder

By Peter Cooper / September 14, 2006

Radrails

The latest version of RadRails, the Ruby on Rails IDE, 0.7.1, has been released for Windows, OS X and Linux. Some fixes to the reliability of starting and stopping servers from the IDE have been made, and some refactoring has taken place. The “Terminal” view has been replaced by a Console view which all generators, rake tasks, plugins, and other scripts outputting to stdout will use. A configuration preferences pane has also been added, making it faster to start new projects. Read More

By Peter Cooper / September 14, 2006

HAML is a new template language for Ruby on Rails developed by Hampton Catlin, a Canadian Rails developer. It’s a high-level, heavily semantic language that breaks the mold of RHTML and makes it very hard to make markup errors. In a way similar to Python, HAML relies on indentation, which it uses to enforce DOM hierarchy.

Here’s an example of some HAML code in action:

!!!
%html
%head
%title Client Admin Site
%meta{“http-equiv”=”Content-Type”,
:content=”text/html; charset=utf-8″}/
= stylesheet_link_tag ‘tabbed’
= javascript_include_tag ‘tabbed’
%body
#application
#header
.container
.statusbar
.logo
%strong Admin Interface
.menu= link_to ‘logout’,
:controller =’account’, :action =’logout’
%br{:style=”clear:both;”}/
.tabs
%ul.navigation
%li= link_to ‘Member Approval’, member_admin_url
%li= link_to ‘User Management’, user_admin_url,
:class =’selected’
%li= link_to ‘Pages’, page_admin_url
%li= link_to ‘Reports’, reports_url
%li= link_to ‘Help’, ‘/’
#page
#content
//These will only render if there is
a non-false value returned from the helper
#errors= print_flash(:error)
#notice= print_flash(:notice)
= @content_for_layout
#sidebar= @content_for_sidebar || false
%hr/
#footer
%p= “Copyright Hampton Catlin 2006″

Learn more in this article. Read More

By Peter Cooper / September 13, 2006

Geekupschedule

GeekUp is a community of developers in the North-West of England (a fine place by any measure) and they’ve put together a FREE, one-day mini conference about Ruby and Rails in Manchester. The event is limited to 40 people and is aimed at newcomers to Ruby and Rails. (If you’re wondering how to get there, take t’buzz to top o’hill ‘n than walk down’t'other side.) Read More

By Peter Cooper / September 12, 2006

I want to look at the history of the BASIC language, the uptake of novice programmers, and how Ruby could capitalize on them in the future. Read More

By Peter Cooper / September 11, 2006

Peter Armstrong has just released the initial version of his PDF-only book, Flexible Rails. It’s available for $20, and anyone who buys the book now will get free PDF copies of every subsequent version of the first edition of the book. You can also order the book in 5 copy, 10 copy, and 30 copy editions for use in the workplace.

The book is at 214 pages and Peter claims is only 20-40% complete so far. Despite this, the current table of contents includes:

Overviews of Rails 1.1, Flex 2, Flash 9, and how they all work together
How to install everything
Creating an initial ‘hello world’ project
Flex login systems
Sending XML with HTTPService
Creating a basic GUI with MXML
Getting tasks to show up in the task grid
Debugging XML
Refactoring

Looks like it could become the guide for those interested in the interoperability of Rails and Flex. Read More

By Peter Cooper / September 10, 2006

Chris Wanstrath has put together a ‘mix tape’ of useful tips and tricks for irb and Rails’ script/console. Some great bits and pieces in there, and people are leaving even more tricks and tips in the comments! Read More