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.
Heroku's intermittent down-time (Work around)
ror-e.com was recently affected by heroku’s down time. [more inside]
Rollable, pun intended agnostic roles for rails!
Figured I’d make a gem, following up my last post. If you liked it, make sure you check out this article on the gem. If you liked the code, check out the github link in the article :-)
rails_best_practices 0.8.0 released
I just released rails_best_practices 0.8.0, it supports simplify render in views check and simplify render in controllers check, and fix a few bugs, see more here.
Code with me – for free!
2011 has been a good year for me so far – financially as well as in terms of cool work in general. I feel like it’s time to share some of that luck with others and spend a couple of hours per week working pro bono, helping people. Read the blog post for details and spread the word. :-)
I just posted a change I made to our loc...
I just posted a change I made to our local DJ copy to force the worker to fork to handle each job, keeping memory leaks under control.
EdgeRails : Map your identity
Thanks to the fantastic work of Emilio Tagua during the Ruby Summer of Code 2010, Active Record will gain an identity map in 3.1! Read more about it on EdgeRails.
UUID primary keys with ActiveRecord in Rails 3
Sometimes it is useful to have primary keys in ActiveRecord that are independent from a database’s autoincrement implementation. With ActiveSupport::Concern this can be done smoothly in Rails 3
Enabling UJS in Rails3 with jQuery: in 3 easy steps!
Here’s a quick and easy approach to include jQuery in your Rails app, and enable Unobtrusive Javascript support; at least until Rails 3.1 ships out with jQuery as the default Javascript library!
Ruby wrapper for google's cityhash
It’s a FFI wrapper for google’s cityhash library - https://github.com/nashby/cityhash
Free Webbynode stickers for everyone!
We’re giving out free stickers! Want some? Grab them while they’re hot blog.webbynode.com/2011/04/get-your-webbynode-stickers </a>
The art of product backlog prioritization
As a fan of agile development, and as a member of a 2 person team building a rails web app, I’m sharing my two cents on product backlog prioritization. The blog post is targeted to small teams who like lightweight and iterative processes. Also, many thanks to the ruby and the rails community and all your advice and gems. Launching Sandglaz wouldn’t have been such a success without you.
Appraiser = a simple command line utility for Gemfile
appraiser colorfully displays ./Gemfile contents. screenshot is here.
Gmail Notifr: a RubyCocoa Project Rewritten in MacRuby
RubyCocoa is dead, so Gmail Notifr has been rewritten in MacRuby, checkout it out on github.
Reading obfuscated code
I studied the Almost Sinatra source (eight line sinatra clone) and figured out what tricks it was using.
Redmine plugins development hints
I posted some hints that could be usefull for any redmine developer: Redmine Plugin Development - Part1: Generation, Enumerations, Hooks Redmine Plugin Development - Part2: Journal, Customization of Redmine Menu and Core.
Let's share our Ruby toolboxes
We just published a big list of gems, plugins and APIs that we use in our work. Hoping more other companies and individuals will share theirs too.
filepath: 'which' for open files
Tired of mashing tab at the command line or dragging file handles from your favourite text editor so you can reference files in the terminal? It annoyed me sufficiently enough today so I hacked together filepath, which’s little brother. Instead of spec sp[tab]/mo[tab]/it[tab]e[tab][tab][tabtabtabtabtabtab], you can now do spec `filepath` Assuming you just tabbed to your terminal from your editor</code> or spec `filepath textmate` if you want to be more explicit.
Prettify MatchData
pretty_match_data is a tiny tool to prettify MatchData. Screenshot is here.
Replace sed/awk/grep/wc/... with pure & readable Ruby
Be a instant-commandline-ninja without learning new tools, e.g. number of files by date: ls -al | pru ‘split(“ “)[5]’ ‘grouped.map{|d, f| “#{d} : #{f.size}” }’ try Pipeable-Ruby (pru).
Asynchronous Processing with Actors and girl_friday
I’ve posted an introduction to using Actors for safe and easy concurrency with Ruby and then created a gem, girl_friday, which uses Actors to provide a next generation message queueing system. If you’re thinking of using delayed_job or Resque for your next project, take a look at girl_friday too!
Easy and DRY API responses in Ruby
The gem acts_as_api provides a simple interface to determine the representation of your model data, that should be rendered in your API responses. It’s been around for some months, time to update the documentation: Gem Getting Started Page Wiki
Friendly error messages in Rails forms
This tip suggests a way for making Rails form error views more user friendly.
Intuition & Data-Driven Machine Learning
Machine learning is hard, right? It doesn’t have to be. Focus on developing intuitive insights, get more data, and get started! A video and Ruby code examples from a talk at GoGaRuco 2010.
Test after_commit hooks with transactional fixtures
Rails 3 has built-in after commit hooks: awesome! Those hooks don’t fire during tests/specs when transactional fixtures are enabled: non-awesome! It’s pretty easy to monkey-patch it to work the way you’d expect: awesome!
Meta Tools Gem Released
I’ve created the gem “meta_tools”. Blog post: Link, Gem: Link, Git: Link