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.
Ruby on Rails Model Validations
I released a new podcast episode where I discuss the basics of Ruby on Rails model validations. If you’re new to Rails or need to pick up some ActiveRecord chops then check it out.
The DHH RSpec debate
I weighed in on why I think debates are important and what I got out of the DHH debate in a recent podcast episode. I think this type of debate is important, even if we don’t agree.
Benchmarking ActsAsList vs RankedModel vs Resort
We ran some benchmarks on different sorting libraries for Rails 3 and wrote a blog post explaining what we found out :)
New gem: ruby-perl (run Perl in Ruby)
Today we announced ruby-perl. ruby-perl lets you evaluate and run Perl code within the same binary, without any heavy-weight forking of sub-processes. Enjoy the compactness, robustness and maintainability of Perl! For more background info see our announcement blog post.
Bookshop: Where Ruby Meets DocBook Development
I just published an early release of our gem, bookshop, an open-source Ruby-based framework for DocBook toolchain happiness and sustainable productivity. The framework is optimized to help developers quickly ramp-up, allowing them to more rapidly jump in and develop their DocBook-to-Output flows, by favoring convention over configuration, setting them up with best practices from the get-go. Reflections, Suggestions, and Assinine Comments Welcome! [more inside]
13 Rails-specific hints for your rails console.
Get some ideas for your .railsrc :)
Psychedelic: Awesome Syntax Colorizer in Ruby
I just published a new gem: Psychedelic, Awesome syntax colorizer in Ruby. It can automatically colorize any output in your console, supporting Ruby, Python, Perl, C++, Brainfuck… and any language you know magically. What are you waiting for? Use Psychedelic in your project TODAY!! RIGHT NOW!! (If it’s April 1 in your timezone LOL)
Vim for rails developers: indenting code
I just published a new tiny post of the series vim for rails developers: indenting code.
Freezing code and how to extend functionality
It is agreed that monkey patching can be naughty, but with a bit of discipline can be a great tool, a slightly more evil (in most instances) thing to do is to freeze code. This beginners article shows how to extend classes using modules. Even if those are frozen.
Ruby VS Python Event
RubyVsPython.org - we are organizing an event between rubyist and pythoners to see who has the smartest engineers. Now we need more rubyist to “beat” pythoners. :P Check the website to see if you are interested in this.
Configuring ActiveRecord in Sinatra (7 minutes)
We’ve just launched a (free) screencast called Configuring ActiveRecord in Sinatra. It’s a follow up to our last weeks episode on building a URL shortener. Check it out!
Monkeypatching and the Open-Closed Principle
Static languages require design patterns to open a class for extension, while languages like Ruby require discipline to keep them closed for modification. Pat Maddox and I recorded a video podcall about the tradeoffs and benefits yesterday. Come tell us what you think! Monkeypatching and the Open-Closed Principle
Rails 3 & jQuery Client Side Validations
I’ve just released the 3.0 gem of Client Side Validations It is a complete rewrite and supports all Rails 3 validations (falling back to server validations if it makes sense), nested form fields are now supported, Mongoid 2.0 is supported, custom FormBuilders like SimpleForm and Formtastic are supported, custom validations are supported. Client Side Validations now has a system of callbacks for more control over your error rendering. Check out the Blog post to get started!
Detect and Fix HAProxy+Apache+Passenger Queue Backlogs
Traffic to a Rails app can pass through a number of queues (load balancer, Apache, Passenger, etc). It’s easy to miss a backlog in one of these queues - learn how to find and fix queue backlogs in your web stack.
Rake Notifier
Rake Notifier is a small script I wrote to be notified via email whenever a rake task throws an exception.
Introducing Test Driven Development (TDD) with Rails 3
New Blog Post: Darcy Laycock (@sutto) - Introducing Test Driven Development (TDD) with Rails 3.
passage - a tiny, flexible OpenID server with many uses.
Check out passage http://github.com/jondot/passage. A tiny, flexible OpenID server which you can customize and hack, for personal or public use.
MacRuby and Xcode 4: Build a self-contained application
Using Xcode 4 to bundle MacRuby for a self-contained, ready-to-distribute MacRuby app.
Static Asset Packaging for Rails 3 on Heroku
I just put up a post about how to combine and minify Javascript and CSS in a Rails 3 app on Heroku.
Version 0.0.3 of em_mysql2_connection_pool released
I just released the version 0.0.3 of the em_mysql2_connection_pool gem. Are you using the fabulous MySQL2 without ActiveRecord or Sequel? Evented? The you need something like the em_mysql2_connection_pool gem to prevent the usage of a connection while it’s still in use by a previous query. em_mysql2_connection_pool is lean and in production use at laut.fm.
Ruby on Rails Course
If you’re looking to learn Ruby on Rails, I’m teaching a six week Basic Ruby on Rails course starting next Monday. So, sign up quick to get in.
Useful Rewrites for Nginx
Kevin Rutten’s post walks through moving some common redirects up into Nginx, freeing Rails to do what it does best.
Learn how Postrank uses Eventmachine and Ruby to scale
Learn how Postrank scales their app with eventmachine and ruby on the latest episode of Webpulp.tv.