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.
Laminate - Safe user templates for your Ruby apps
We’ve recently pushed a new Ruby template system called Laminate up to github. Laminate binds the Lua runtime into Ruby to support safe user templates. Laminate is deployed in production supporting our VodSpot product.
Paperclip and multiple content types
If you want to allow multiple types of file uploads with paperclip, but only resize images, try this:
ActiveRecord Attribute Normalization (Rails Plugin)
I just announced a Active Record Attribute Normalizer Plugin (soon to be a gem) hosted over at github. This plugin goes a long way in helping you get strict on you active record models through easy normalization.
Fresh from BDDCasts
Using Spork to speed up RSpec and Cucumber episode describes the installation and configuration of Spork to make RSpec and Cucumber load specs and features a lot faster. This episode is part of the new Tools series which will present a number of tutorials on how to use tools to automate and streamline your BDD process.
New Rails Plugin for LESS CSS
There is now an official Rails plugin for using LESS CSS. This seems like a nice improvement over the previous “less-for-rails” plugin.
validates_timeliness v2.2 released - Date and time validation for Rails
validates_timeliness version 2.2 released with Ruby 1.9 support and a fix for conflict with Shoulda.
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:
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 .’.
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 %>';