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.
Easy Rails cache expiry
Cache expiry can be a bit complicated to setup with memcache, but I’ve released a very small plugin that adds simple cache expiry to the rails filestore cache, no extra processes required - perfect for shared hosting (or lazy coders). E.g. cache({:controller => ‘mycontroller’, etc.}, {:expires_in => 1.day}). So easy it’s (not) a crime. Get it here: http://github.com/adamsalter/filestore_expires_in-plugin
Sweet New Cucumber Feature!
Engine Yard’s Dave Astels and Larry Diehl collaborated this weekend on a pretty cool new Cucumber feature – check it out!
5 Ruby-related blogs for September
This month’s batch of Ruby blogs to check out.
Using Cucumber to test a multilingual app
Have you ever wondered how to test your multilingual app using Cucumber without breaking your steps every time you change a text? Or how to test the app across multiple locales? And all that - if possible - without cluttering up your stories/steps too much? Read here about some possible approaches.
CloudCrowd — Parallel Processing for the Rest of Us
CloudCrowd is a new gem that provides convenient, MapReduce-inspired, scalable processing for slow jobs like image resizing, PDF processing, and video encoding. The gem provides a central server and job queue, worker daemons that can be run from anywhere, and a web interface for keeping track of it all.
sinatra-redis
I just shot up sinatra-redis to Github. Use Sinatra and the popular Key-Value store Redis with only a simple require. Install with rip and BOOM.
Fortnightly Ruby Problem Challenge for Beginners
Many Ruby Beginners (newbies) feel the need for a Ruby Program Challenge (with prizes, if possible) - with problems simpler than what we have on Ruby Quiz. RubyLearning needs your thoughts, suggestions, ideas on how to make this possible. Spare a moment. Thanks.
coulda - Cucumber-like BDD power without the magic
Coulda is a new testing library by Evan Light that provides “Cucumber-like BDD power but with an internal DSL.” Further: “coulda believes that the best way to reuse code is the good ol’ fashioned method. Instead of sharing files of regexps mapped to procs, you just write methods. That simple.
POSIX Realtime IO, Ruby and Events
Barcampt PT presentation on POSIX AIO, Ruby and events.
ReversibleData for Testing
ReversibleData is a fairly new gem built to solve one of the problems associated with testing AR-backed models - Managing a database (and associated tables) and models. It handles creating / dropping tables and creating / removing models (e.g. so a User model may only exist in the scope of a test). It’s like migrations but a lot simpler / scoped to make testing easier.
Install Ruby 1.9.1, Rails 2.3.4, sqlite3, and Thin on Windows using Mingw32
I had a little trouble getting this setup but now that it’s working I wanted to share the results.
Announcing the First Ever JRubyConf!
It’s our extreme pleasure to announce the first annual JRubyConf, to take place Sunday, November 22nd, immediately following RubyConf 2009! We’ve been working on putting this together for a little while now, and it’s finally time to share. [more inside]
My Emacs for Rails
Santiago Pastorino’s Emacs for Rails. It’s the init file and a set of plugins to give a nicer experience on Ruby on Rails development. Enjoy it.
Learn how to implement polymorphic relationships
An easy way to understand polymorphic relationships. A bit crude in his writing, but he gets the point across. http://www.mrkris.com
Ruby 1.9 encoding checker
Sometimes it can be really hard to track down what files might not be encoded correctly on Ruby 1.9… This gem makes life simpler by allowing searches from the command-line like ‘find_bad_encodings .’. http://github.com/adamsalter/bad_encodings-ruby19/tree/master
What does "Content on the site you've linked to is invalid" mean on RubyFlow?
I’ve been trying to post here for days but I keep getting a ‘Content on the site you’ve linked to is invalid’ error. I can’t find any explanation as to why. Does it not like non w3c compliance? Advertisements? I’m trying to post a legit site! My kingdom for some feedback. [Ed: All is explained inside..]
Sending Email Using Gmail and Action Mailer
How I set up my Sinatra app to send email through Gmail using Action Mailer.
The first in a series of Link-Blogging posts
Blink #1 - The first in a series of Link-Blogging posts… with links to stuff for which I don’t have time to write full-length articles.
jsvars rails plugin
I just released jsvars - a Rails plugin for taking some of the pain out of passing values from Rails -> JavaScript. This in the controller: jsvars[:loginPath] = login_path instead of this in a script tag: var loginPath = '<%= login_path %>';
Fat Free CRM 0.9.7 released
Fat Free CRM is open source Ruby on Rails-based customer relationship management platform. Release notes for this version are available at the project wiki page on Github.
Simplifying your Ruby on Rails code: Presenter pattern, cells plugin
In this article I’m explaining how to work out bloated controllers in Ruby on Rails applications, what to do with domain logic in views, when there is only one place where it is used, and how to simplify your controller code with lots of fragment_exist? checks.
Tracking Down Slow-Running Examples in RSpec
As the number of tests goes up in your Rails project, you’ll find yourself spending more and more time starting at the field of green dots waiting for RSpec to finish. This article shows you how to track down slow-running examples to target for refactoring.
How to avoid the dog-pile effect on your Rails app
In this post, Hugo Baraúna explains what is the dog-pile effect, the dangers it poses to your application scalability and how to avoid it.
Unobtrusive JavaScript helpers in Rails3
If you want to know how remote links and forms will look like in Rails3 then check out a post about unobtrusive JavaScript helpers.
A Cacheable Hash That Stays Synced
Rails.cache freezes values in hashes that are cached directly. CacheableHash is a wrapper for Hash objects that prevents that from happening. Changes to the Hash being wrapped are automatically persisted back to the cache store so that everything stays in sync.