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.
How Canary Release helped delivering a Rails 2 to 3 upgrade
Hello rubyists from all over the globe! Just wanted to share with you our experience on delivering a big Rails 2 to 3 upgrade using a Canary Release approach. [more inside]
Green Ruby News #91
Another list of curated links about ruby, rails, webdev and other in Green Ruby News #91.
tty-progressbar released!
I’ve released tty-progressbar that displays progress bars in terminal and is super flexible. It is one of the components that is part of tty suite of tools. Please give it a try and let me know what you think!
Configuring Linux Box for Ruby/Rails Development with scripts
In this article I discuss why and how to do virtualization in (Ruby) development. Both - Vagrant and Docker are used for initial setup. Provision is done by the separate gem - linux_provision (similar to Oracle Instant Client Provision and OSX Provision).
gem TheDataRoleBlockRails released
TheDataRoleBlockRails is a mix of 2 popular frontend solutions ai/evil-blocks and kossnocorp/role with few patches for SLIM and HAML.
Memoization is an optimization technique...
Memoization is an optimization technique where you cache the results of expensive method calls. When the method is called with the same set of arguments, the cached result is returned. In this post, we will look at how we can implement memoization using Ruby’s metaprogramming features. [Continue reading…]
Back to Basics: Anonymous Functions and Closures
Anonymous functions and closures are a useful concepts included in most modern programming languages. Back to Basics: Anonymous Functions and Closures goes into depth in Ruby and JavaScript on this concept.
4 Fantastic Ways to Set Up State in Minitest
RSpec gives you a number of ways of setting up prior to test runs, but only some of these have direct analogs in Minitest. In this post, I show you the code that will let you approximate RSpec’s features (and explain when and why you might want to avoid using it). [more inside]
One-liner to get a precompiled Ruby on your own servers
Not a fan of RVM or rbenv for installing Ruby on your production/development servers? Ruby 1.9.2, 1.9.3, 2.0.0, 2.1.x for Debian, Ubuntu, CentOS, RHEL, Fedora is now just a download away.
To comment or not to comment, that is the question. About self documenting code
The very real danger with commenting code is that it becomes outdated while the codebase rapidly evolves. And out of date comments are far worse than no comments. So what’s the alternative?How to write code that speaks for itself.
Feature Flags on Rails
In this post we will explore how we’ve implemented feature flags in a current web-application we’re working on. It’s a very simple process which means there are no excuses not to use a feature flag in your application.
Zopfli-ffi - Ruby wrapper for zopfli library
I just wrote article about Zopfli Compression Algorithm and Zopfli-ffi Ruby wrapper.
Complex HTML tags with content_tag
Last weekend I set myself to customize content_tag to allow dynamic tag generation. [more inside]
Trailblazer - A new architecture for Rails. Free preview chapter out!
Trailblazer introduces several new abstraction layers into Rails. It gives developers structure and architectural guidance and finally answers the question of “Where do I put this kind of code?” in Rails. My book’s first sample chapter is available now as a free download.
Robots Gain Autonomy to Manage and Analyze Embedded Data
ITTIA DB SQL is a proven choice for robotic data storage, providing a safe and efficient way to update and query local data on various embedded platforms. With ITTIA DB SQL, data is always available to multiple concurrent tasks and can be easily distributed to other robots and control systems . As a result, robots become autonomous data analysts and decision makers.
Testing execution of a before_filter with RSpec custom matcher
I just published a post about how to test execution of a before_filter with RSpec custom matcher.
New from RailsApps: Mailing List with Active Job
I’m so delighted with the new Active Job feature I decided to release a new example application and tutorial right now, rather than waiting for Rails 4.2 final. Here’s Mailing List with Active Job plus an article, Updating to Rails 4.2. Of course, you can build it with Rails Composer.
How to go beyond documentation to learn a new library
You’re working with a brand new library or feature, and you just can’t understand the documentation. Maybe it’s hard to set up, so you have to bounce between RDocs until you learn how everything fits together. Maybe the documentation doesn’t even exist. Or maybe you just learn best by seeing lots of examples. You need some help. But where do you learn how to use a feature, if not its documentation?
Intercity Chef Repository 2.2.0 released
We have just released version 2.2.0 of our Intercity Chef Repository https://intercityup.com/blog/intercity-chef-repository-2-2-0-released/
gem TheLog. Take care of your joints!
Take care of your joints! Replace console.log with log in your Rails App. 5 minutes gem for for Great Good! [more inside]
Representable 2.1 Is Faster!
The new representable release allows to skip rendering and parsing of properties dynamically. This allows to exclude properties at run-time, e.g. to reflect permission restrictions. It also got faster and we added a debug mode to help understanding what Representable does internally.
When to Use Protected Methods in Ruby
The protected method visibility in Ruby is one of its more confusing aspects. I recently took a closer look at it, and found that it has an interesting use case. [Continue reading…]