The Ruby and Rails community linklog
Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!
Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Manually Invoking a Rails Sweeper
Let’s say you have a Rails app, and that app has a Photo model, and that photo model has many Destinations, and the destination pages are cached to disk, and when you update a photo you need to expire all of the current destination pages that photo is currently associated with. Here’s how.
Babilu, Rails I18n for JavaScript
Tore Darell has written a library to mirror your I18n setup in Ruby, together with all your translations, with JavaScript. Take a look at his blog for some instructions: Introducing Babilu: Rails i18n for your JavaScripte.
Passenger is 1.9.1 compatible!
Phusion has done some great work (including patching fastthread and ruby-sqlite3), and Passenger is now the first “serious” server to run on 1.9.1. Read all about how they accomplished it at their blog: Getting ready for Ruby 1.9.1.
Connect Arduino devices over the internet with Ruby. Enjoy PACHUBERO!
We put together Pachubero, a very simple ruby library to connect to Pachube and request data from the feeds. You can get Pachubero from GitHub. More info available at MIKAMAI blog. Hope this is helpful.
Considerations for Creating a Test Driven Ruby Project
A great post from Corey Donohoe on TDD with Ruby projects.
Rails 2.3.0 RC1 released
Templates, Engines, Rack, Metal, much more
Measuring monkey-patching
Here’s a gist to measure the method bloat of requiring libraries by requiring them like so: [more inside]
Production like performance for Rails 2.2 in development mode
Tired of how slow your rails app in development mode is? Check out rails-dev-boost plugin and get near production like speed with all the advantages of the class/view reloading.
Pushr with IRC / Jabber notifiers
Pushr, a Sinatra application deploying apps by calling cap deploy when you push to a Git repo, just got refactored and makes it easy to add more notifiers, IRC and Jabber are included.
Alternative Prawn handler for Rails
Introducing Prawn-handler, an alternative to prawnto for clearer PDF view code while retaining regular access to instance variables from the controller.
Shoulda macros for testing ActionMailer
You’ve been missing some shoulda macros for your ActionMailer tests. Yes, the ones that let you say “should_have_to_recipient” or “should_have_subject”. The aptly named shoulda_action_mailer has those macros, and few more. It’s way incomplete in that you can’t expect parts or content types or other special things; but it’s a start. Add ‘em if you got ‘em (more macros that is).
Can we share extensions without monkeypatching?
My blog post calling on Ruby programmers to create/share their extensions without assuming they want to monkeypatch.
Ruby 1.9.1 on Gentoo Prefix
With stable Ruby 1.9.1 out, it’s time to get it installed on your computer. One way, particularly useful for those working on Macs, is Gentoo Prefix. This article helps you to get started.
Sinatra's Hat 0.1.1 (the rewrite)
Sinatra’s Hat, the library that lets you create a RESTful Sinatra app in 1 line of code has been completely rewritten, wit a new and improved API. Example mount Article. And that’s it. It works with ActiveRecord out of the box, but can support any ORM. It also supports nested resources, the ability to specify actions to be protected via basic auth, custom formatters, and a sweet DSL for specifying custom flow control.
Access the current user in an observer
How to reference the current user from an observer without violating the MVC architecture.
Quick hack to visualize nested Ruby arrays with Graphviz
I wanted a hack to visualize programs from my compiler project using Graphviz. The script will turn arbitrary arrays containing other arrays or objects that respond to #to_s and turn it into a tree structure.
PureMVC Ruby Release 1.0
PureMVC Ruby Release announces the 1.0 release of the Ruby port of the popular PureMVC pattern. A gem is also available on rubyforge here. The framework is unit tested and a demo application is also provided. Check out the above link for more info.
Plenty of Stats
plentyofstats Using Ruby to scrape the free dating site Plenty of Fish for demographic info. Find out which city drinks and smokes the most! Full source and data at github.
Ruby 1.9.1 released!
It’s just been announced, 1.9.1 the first stable release of the Ruby 1.9 series has been released:
Index and Search Your Local Rdocs with Croc
Croc indexes your local gem rdocs and generates a web page you can use to search and access them, similar to gotapi.com. It’s handy because it covers all your gems and is available when you don’t have an Internet connection, like when on a submarine. sudo gem install croc and then run croc. More details on my blog.
grrid: a Prototype.js based javascript grid
I’ve recently started work on a pure javascript spreadsheet-like grid control called grrid, and I’ve put an early version on github…
'The RSpec Book' is out in beta
The Pragmatic Programmers released a beta (PDF) version of The RSpec Book. The topics covered: RSpec, Cucumber, Behaviour Driven Development, BDD on Rails, RubySpec. The lead developer of RSpec, David Chelimsky, is one of the authors.
Sinatra Screencasts by Adam Keys
Classy Web Development with Sinatra is a set of two screencasts by Adam Keys on the Sinatra Web application framework. I’m going to be reviewing them for Ruby Inside shortly, but if you’ve already seen them and have opinions to share, leave a comment and I might include it in the Ruby Inside post (with a link too, if you like)!
Muxtape moves to Ruby and Rails
Luke Crawford, the new CTO of Muxtape, has written about how Muxtape has come to move from PHP over to Ruby and Rails. A Muxtape API is also in the works and they’ll be looking for Rubyists to get involved - exciting stuff.