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.
Unicorn Unix Magic Tricks
I just published the blog post version of my talk Unicorn Unix Magic Tricks. It looks at how the Unicorn webserver works in great detail and explains the underlying Unix concepts which it uses to leverage the power of the operating system. It’s a really detailed (and long) blog post that shows how forking, system calls, signal handling, pipes and Unicorns master-worker architecture work.
What attributes RubyGems’ Marshal file really contain?
RubyGems started with a single marshaled file called Marshal.4.8.gz containing the array of every Gem::Specification object for every gem that has been uploaded to RubyGems directory. Since then we have new indexes for RubyGems to speed things up, but good old Marshal.4.8.gz is still around carrying important information about gems from RubyGems.org. Are you interested to know what is and what is not there and finally understand why gem specification rails -r does not give you the information on licensing even though it’s part of rails’ gemspec file? Read more
Param Validators as Ruby objects
Using service objects as replacement of strong params makes controller validation easy and complete. Check our gem here: ParamsFor. Thx and happy coding.
Are Your Cache-Control Directives Doing What They Are Supposed to Do?
Cache-Control directives are pretty straightforward to understand. They’re easy to use as well if you assume that all the caches between your end user and application correctly implement the spec. Unfortunately, as with any spec, you can’t make that assumption. You need to be aware of any spec misinterpretations in the implementation of the caches that you’re using, and properly account for them. Learn How to Get Cache-Control Right
Healthy Codebase and Preparatory Refactoring
In a recent episode of the RubyRogues podcast, Martin Fowler and Jessica Kerr illustrated Healthy Codebase and Preparatory Refactoring with beautiful words and powerful metaphors. I share those in this article.
Writing DSLs in Ruby without monkeypatching Object
Ruby is a great programming language to write DSLs - unfortunately often developers monkeypatch Object to define top level scope methods. There is a better way that does not pollute Object with unnecessary methods.
Refactoring - Why do we need to do it?
Refactoring - WHY? opens a short series of blogposts answers the “why”, “how” and “when” of code refactoring.
Creating Rails Active Record Validation Contexts with Inheritance
I wrote a new post on Creating Rails Active Record Validation Contexts with Inheritance. Hope you enjoy!
Sublayouts in Rails in 3 easy steps
Sublayouts in Rails in 3 easy steps.
What's the difference between `irb`, `bundle exec irb`, `bundle console`, and `rails console`?
If you don’t know the difference between the various Ruby and Rails consoles, you’ll have some problems. Maybe you’ll require a file and get the wrong version. Or a library you thought would be avaliable, wasn’t. So how do you make sure you’re using the right console at the right time?
Getting your rails app running on the SAP HANA cloud platform.
How to get your app running on the SAP HANA cloud platform.
Lets make our life easier while working with VCR cassettes
Do you hate fixtures? I do as well. Read more
Speed Up JavaScript Capybara Specs by Blacklisting URLs
Typekit, web.typography.com, and other font services or external APIs can slow down your JavaScript integration tests. Speed up your tests with this setting.
ReadActivity - track read/unread status of your models.
ReadActivity supports model to track read/unread status for a specific time, like ‘Seen by 99’ on Facebook. Please check out my GitHub.
ActiveRecord::SaneSchemaDumper for a cleaner db/schema.rb file
Last week, we released the activerecord_sane_schema_dumper gem (extracted from an initializer we’ve been using for months) in order to generate a clean db/schema.rb file with Rails. It strips useless (and harmful) alignment whitespace from the file so changes to your DB columns doesn’t affect irrelevant lines.
Build a Ruby Gem is 25% off until the end of RubyConf
Build a Ruby Gem is 25% off until the end of RubyConf. Hope you enjoy!
Open-sourcing Aloo
Today I’m Open-sourcing Aloo - my Rails Rumble 2014 submission. Aloo is GIST for data - uses Rails and Redis.
stream-rails, a gem to scalable newsfeeds and activity feeds
I’ve just released a new version of stream-rails. A gem to create activity feeds and newsfeeds with Ruby on Rails. The gem comes with a very basic example app that you can deploy to Heroku.
finite_machine v0.10.0 release
finite_machine gets better with alias_target method and log_transitions option. Please see documentation for full interface.
Rubinius 3.0 - The Language
The last post in the intro series on Rubinius 3.0 talks about some exciting changes to the language.
Shorter, simpler code with Forwardable
I’m an avid user of Forwardable from Ruby’s standard library. My latest article explains why you can make shorter, simpler code with Forwardable and hide the noise of boilerplate Ruby code.
tty-spinner - 0.1.0 release!
I just released tty-spinner for drawing spinning animations in terminal emulators.
Rubinius 3.0 - The Tools
Here Brian introduces the subsystems of Rubinius: GC, JIT, Metric, UI, and CodeDB.
Clojure Loops in Ruby
An article that builds Clojure style loops in Ruby using continuations. Not recommended for pregnant women or individuals with pre-existing heart conditions.
Action Access: Access control system for Rails.
Action Access is an access control system for Rails that provides a modular and easy way to secure applications and handle permissions. It works at controller level focusing on what actions are accessible for the current user instead of messing with models and their attributes. Read more »