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.
Large Ruby File Downloads Done Right!
Large Ruby File Downloads Done Right! How to download and stream large files to disk using ruby leaving your RAM well alone.
GemStats.org - Help us collect and publish Ruby library usage.
GemStats.org aims to get a good snapshot of what the current popular gems being used in Rails apps. Just submit your Gemfile. Then questions are optional but will help. (Rails 2 supported by copy/pasting the gem directives from your environment.rb file) This is for the good of the community!
EngineYard AppCloud Account Management
New blog post on managing multiple EngineYard AppCloud accounts.
Simplify your git usage with git-friendly
git-friendly is a collection of shell scripts for simplifying common git actions: push, pull, branch, merge. Commands have bonus niceties: push copies a GitHub compare URL to your clipboard, and pull runs bundle install or npm install when it’s finished (if applicable).
Quickstart: Testing Devise with RSpec Request Specs and Capybara
For those needing a really high level, quick start overview of testing authentication with RSpec request specs, I wrote up some examples.
rspec-apotomo released - Spec your Rails Widgets!
We just released the first working 0.9.1 version of apotomo-rspec that brings render_widget and trigger to your specs. Check out this brief walk-through.
I recently heard an account of a web dev...
I recently heard an account of a web development project from both the point of view of the consultancy doing the work and the client. Did their experiences match? [more inside]
Prevent GoogleBot Overload with Default Nofollow
Sometimes you don’t want Google crawling all over your Rails app, whether it be for load reasons or SEO reasons. Here’s a quick article that shows you how to easily default links to rel=”nofollow”.
PoEAA on Rails
The book Patterns of Enterprise Application Architecture (PoEAA) laid the blueprints for Rails’ architecture. However, as applications growing more and more complex, developers are starting to realize these default architectural patterns come with Rails may not scale very well. In the post PoEAA on Rails, I walk you through some enterprise patterns from the same book that Rails’ architecture heavily base upon, and provide suggestions on scaling your Rails codebase. [more inside]
Versioning and Authenticating APIs by Headers
I’ve just put together some thoughts on APIs and how to manage different versions of them though headers instead of paths, all learnt through the development of Flying Sphinx. [more inside]
Talk Ruby to a Ruby Class instead of JSON to an HTTP Service
Remote services probably talk HTTP and JSON but you’d prefer to Talk Ruby to a Ruby Class instead of JSON to an HTTP Service. Here’s a guide to creating a client gem for your service including how to create a fake service for development and test.
Challenge: Command line TODO lists
Are you ready for the next Codebrawl? In this week’s contest, we challenge you to create a to-do app that could really work for us. It doesn’t need to be fancy or full of features, it just needs to be useful. C’mon, show us what you’ve got!
rbenv hook for per-app environment variables
I wrote a little blog tutorial on how to create an rbenv hook to auto-load a .powenv (or whatever) file before exec’ing a ruby command through the shell. rbenv is cool
Use the Free Application Namespace in Rails
Rails 3 generates an module named after your application that contains the Rails::Application subclass, but the generators ignore this module and put everything in the global namespace. There is one small gotcha when putting all your application code into this namespace — Use the Free Application Namespace in Rails
Howto use github user pages with nanoc3
The article itself is not recent but I think it can interest anyone wanting to use gihub user pages but without jekyll (nanoc3 is way more powerful), you can find the article here. [more inside]
Twiddle-waka way of specifying gem versions in Gemfile for a rails application.
Should one specify gem versions for each and every gem specified in Gemfile or just specify name and bundler will take care of version ? What is best practice to handle this ? Checkout this article - Twiddle-waka way of specifying gem versions in Gemfile for a rails application.
Web Workings With Ruby - Concurrency Part 1
The next installment of my Web Workings series is available. It discusses the problem of blocking in concurrency, and basic methods of handling the issue through forking and threads. The next part of the series will look into some more advanced methods including select, poll, and epoll/kqueue.
Ruby 1.9.3 Release Candidate 1 Released (What's new?)
Yugui has announced the release of Ruby 1.9.3 RC1. 1.9.3 is on its way! But what’s new? I summarized the changes over 1.9.2 at Ruby Inside and also linked to a talk by Yuki on the same topic. Highlights include a change in Ruby’s licensing, faster loading performance, and a better garbage collector.
Ruby Concurrency
I’ve been diving in deep lately writing a highly concurrent server in Ruby, and I’ve been a bit disappointed. Here are my comprehensive findings on The (Sad) State of Ruby Concurrency.
rails_best_practices 1.0.0 & 1.0.1 released
I just released rails_best_practices gem 1.0.0, rewriting the parser by ripper, which perfectly supports ruby 1.9 (json hash), version 1.0.1 fix an error about line number of constant node, release note is here. I also wrote a blog post use ripper instead of ruby_parser to share my knowledge.
Bug hunting with Git bisect
I wrote an article about Git bisect (Example included!)
Using Redis as Rails Cache Store
I just posted how to use redis as rails cache store.
Programming Language detection of files & blobs
Linguist can do that … but it requires lot of dependencies (including pygments, which needs python). If you just need plain language detection, check out the dependency free language sniffer