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.
Simplify sending emails in Rails
Some tips to lessen the pain of adding email functionality to your Rails app.
A small sandbox app for Titanium Desktop + Ruby
Titanium Playground - a small sandbox app for integration with Titanium Desktop and Ruby (in WebKit and as external unix processes), very simple yet usable and well suited for demonstration purposes. If you like to develop some desktop apps with ruby for Mac/Linux/Windows, you HAVE to take a look at Titanium (it’s really-really cool!) Some gotchas are solved: - you can choose, which rubygems path you want to use (normal is the default OSX installation) - the calling for embedded ruby scripts(as unix executables) is dynamic in development, so you don’t have to recompile the app on any change in ruby files. - you can interact with ruby like in IRB (well, a VERY slim IRB) - you can interact with your database (not only SQLite), but this is of limited use now
A better Array#rand
This plugin overrides the Array#rand method that Rails gives you to support not only getting a single random element of the array back, but also a random subset of elements (as an array) from the source array.
Digging Into A Ruby Installation, Require vs Load And Other Stuff
Digging Into A Ruby Installation, Require vs Load And Other Stuff tries to dig a little bit more deeply into the basic anatomy of a ruby installation and how Ruby discovers libraries at runtime.
A better Rails.cache.increment
This blog post explains how Rails.cache.increment and Rails.cache.decrement can be improved upon.
Ruby Memory Allocation
An interpreter and version agnostic look into memory allocation overheads.Read more …
TwitterLand - All the best Twitter-related APIs in one gem
TwitterLand is a Ruby wrapper for several popular Twitter-related APIs. A nice complement to John Nunemaker’s Twitter gem.
How to create a proxy class in ruby
Ever wondered how ActiveRecord is able to pull of it’s nifty tricks with associations? The answer is creating a proxy class. It’s actually nice tool to have in your nerdy tool belt.
Embracing REST with mind, body and soul
After the addition of respond_with to Rails 3.0, José Valim explains the next steps taken that are definitely embracing REST with mind, body and soul. He talks about the new ActionController::Renderer and why it matters.
Spy vs. Spy - Test Spies
Test Spies make isolation testing easier & maintain the same four-phase test order as unmocked tests.
FFmpeg for the rubyist
The ffmpeg gem provides a nice and easy to use ruby dsl for interfacing with FFmpeg.
My small series on Ruby patterns I don't like :
Explicit ‘return’, throw/catch, and Object#freeze
The Rails State Machine
Nathan Bibler recently posted about the Rails State Machine which this week made it into edge rails.
Creating your own generators with thor
José Valim starts a series of posts about his Google Summer of Code project to bring agnosticism to Rails generators. On this first post, he talks on how to create your own generators with thor which powers Rails generators. Next posts should get deep into Rails new generators implementation and how to use them at best.
Masking Latency & Failures with Squid
Squid cache server can help you mask slow application servers and intermittent downtime via stale-while-revalidate and stale-if-error extensions. A hands on look at configuring Squid and connecting it with a simple Rack application.
Method missing use case
Method missing to simplify queries to an external service, is a nice example on how you can use method_missing as a proxy to external API calls.
PostgreSQL, Rails, and why you should care
PostgreSQL, Rails, and why you should care is a good post from Harold Giménez about the strength of the case for using Postgres with Rails.
Blake Mizerany on a Heroku Tour!
Blake Mizerany (that’s me) is going around the US starting with the East Coast to meet as many of you Ruby, Rails, and Sinatra groups as I can! I just got back from a great visit with Seattle.rb and am off to NYC.rb and BostonRB with more in the works. Read more here and let us know if you would like us to stop by your hood.
Cucumber isn't for everyone, but acceptance tests are!
Dr. Funk is a lightweight rails app that makes acceptance test writing a breeze.
A faster Ruby on Windows is possible
In this follow up post, I compare the mswin32 and mingw32 versions of Ruby 1.8 and 1.9 (4 implementations in total). The results are extremely encouraging.
described_routes is Rack middleware
described_routes is Rack middleware - a followup to my post of July 28th which prompted the excellent suggestion to try Rack
Tabbed Navigation for Rails
Light and very flexible solution for Tabbed Navigation, this might not be the ultimate approach, but the best I could come up with.
Comparing the performance of IronRuby, Ruby 1.8 and Ruby 1.9 on Windows
I ran a mini-shootout on Windows, using the latest version of IronRuby that just released, MRI, and KRI.