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.
Seven advanced Ruby on Rails Fragment Cache techniques
Since Rails introduced the Fragment Cache several years ago, the use of the feature has evolved away from its initial use case. Read about how to use the fragment cache in a modern Rails application at the CRAZ8 Blog
./bin/setup convention
A developer should be able to clone the project and run a single, consistent, reliable command to start contributing.
Google Currency Converter goog_currency gem released
I just released my first gem good_currency. Simple Ruby interface to Google Currency Converter API.
Interact with the DigitalOcean Hosting API
I just released the digital_ocean gem that allows you to create/manage virtual servers with DigitalOcean.com. They use SSDs, have datacenters in NY/US and Amsterdam/NL and are backed by TechStars.
RailsApps Tutorials
I’ve launched the RailsApps Tutorials membership site. Here’s the announcement which explains how subscriptions for tutorials will support the RailsApps open source project. The aim is more example applications, updated regularly, and more tutorials.
4 Ways to make your Rails app faster
4 Rails supported techniques that can make your rails app faster. Read about it at the CRAZ8 blog
Threads are not just for optimizations
Everyone seems to be talking about using threads to speed up and parallelize our code. I just published a blog post about a few ways that MRI uses threads internally to organize code, rather than to optimize code.
Dossier: Turn SQL into HTML, CSV, or JSON with ease
Adam Hunter and I recently released Dossier, a Rails engine for turning SQL queries into various report formats with minimal effort. The SQL can be hand-written and use all of your database’s features, or generated by something like ActiveRecord’s to_sql. See the README on Github for details.
Phusion Passenger 4.0 beta 2: focus on stability
Phusion Passenger 4.0 beta 2 is out, and this release focuses on stability.
JsonBloomfilter for Ruby and Javascript
Bloom filters are awesome but none of the implementations I could find were particularly portable. This implementation allows you to train one in Ruby or Javascript and serialise them to JSON to then reload them in the other language. Very useful for doing client side lookups of things like “valid” usernames without sharing every username in your DB.
Dynamic attributes and MongoDB/Mongoid
Why is this cool you might ask? Well let me explain my problem; I want to create a web service that allows CRUD operations on objects called Events. Events have a name, start_time, and most importantly a game. Depending on the game attribute, each Event will have different game specific attributes. For example, I have an Event with a game value of ‘starcraft2’. Only Starcraft 2 Events have a region and a league attribute, while League of Legends Events have a min_elo attribute. How can we store these Event objects that have different attributes in our one document? Read more here
Why don’t we use Class#allocate more?
There’s a great little method in Ruby that you might not be familiar with. It’s used all the time but it’s hardly ever called directly. The method is Class#allocate. Read about how you might use it in Steve Richert’s latest post on the Collective Idea blog.
Fixing the error: 'webkit_server: cannot connect to X server'
Just added a tiny article explaining how to fix it here
Sinatra OAuth Workflow: Speed Up Your App Development
Check out Eric Oestrich’s code for a Sinatra OAuth Proxy App to speed up third party API integration. Works with Harvest now, will work for other APIs with small changes.
Substance Surface brings reliable text manipulation to the web
Surface is an extensible low-level interface for semantic rich text editing. It doesn’t introduce any UI components, but an API for managing user-defined text annotations. It can be used as a foundation for text editors that support annotations.
The new Rack socket hijacking API
Rack 1.5.0 introduced a new “socket hijacking” API. This article explains what the API is and how it can be used.
Rails learning community
We just launched Rails learning community and I would like to hear your thoughts.
Mutation Testing with Mutant
I wrote a quick introduction to mutation testing using a new gem called mutant. Check it out here.
Using SQLite to Test Active Record Models
I just wrote a blog post about how to test your Active Record models using a SQLite in-memory database for gem development.
evil.rb - doing evil things in ruby
Here be hax, read at your own risk! - http://caiustheory.com/evil-rb
cloudControl PaaS add-on for cloud-based image management
This blog post describes a new add-on for cloudControl, a popular European PaaS provider. Ruby and Ruby on Rails developers can build and deploy their applications using cloudControl and use Cloudinary as an add-on for uploading images to the cloud, performing image transformation & manipulation and delivering optimized images through a fast CDN.
Rails 4, Part 1: What’s Changed in Rails 4?
The fourth major release of the Ruby on Rails framework is coming up rather soon. While no official release date has been announced, many anticipate a release candidate early this year. This version of the framework has been over a year in the making and represents a major change in the way its internals are architected. Read about what else is in store here.