Hire Us

Railsware Blog

on product management, engineering, design, culture and many more...

Slow-Fast Request Balancer

Problem To be honest you don’t have ideal application during start-up development. Some actions are not so fast as you want. For instance you may have some heavy admin reports requests, some lazy import/exports actions, slow third part services network requests, etc… But what if you have already some user …

Fixing multithreading for Rails

Fixing multithreading for Rails in development mode

Preface In Rails, automatic code reloading in development mode is based on autoload,which is not threadsafe. It means you can’t use it while developing multithreaded Rails applications(especially for JRuby). But several monkeypatches can do the trick. Workaround When we discovered this limitation almost a year ago, we had next options: …

Lego, UI library

UI Library: effective way to organize interface components. Layouts

UI Library: Preface UI Library: Writing CSS We’re already familiar with Modules, but they don’t fit when dealing with a site layout. When explaining Modules we’ve learned to think component-based. Now, let’s add one more rule — Grids control width. It means that all Modules should be designed not to depend on width that gives more flexibility when …

Chrome extension that improves New Relic navigation experience

Recently we’ve released Chrome extension that improves New Relic navigation experience, by giving ability to return to time spans you’ve selected previously. If you running out of time while troubleshooting application performance issues New Relic can help you a lot. Tracing general performace issues and bugs become faster and easier. …

Speeding up Authlogic login for Postgres and MySQL

Update (2012, 10 December) Authologic-team patched weird behavior with (I)LIKE and now Postgres users can make everything without clutches. Just use new version 3.2.0. Introduction User authentication – is the most utilized part of Authlogic gem. But default configuration of current version(3.1.2) doesn’t use database indexes or their usage is …

Use New Relic like a Pro

Introduction New Relic has become an industry standard for web applications performance measurement in Rails community.Simply adding and configuring newrelic_rpm gem for your Rails application gives you a great overview of its performance with an adequate level of details. There are still a few improvements you can do to make …

Rails 3.2.9 through associations issues

Recent 3.2.9 release bugfix has brought an issue for through associations.inverse_of usage can solve the problem only partially (polymorphic associations are still affected). UPDATE: patch that introduced this issue has just been reverted in rails master. Few days ago Rails 3.2.9 was released.Among the bugfixes a fix for through associations …

yield-gotcha every Ruby developer should be aware

yield-gotcha every Ruby developer should be aware of

Preface Using yield and blocks is what makes Ruby so different from other scripting languages. But in some cases yield can lead to unpredictable behavior and it’s crucial to understand what can go wrong. Let’s consider next code: File.open(“/etc/hosts”, “r”) do |f| content << f.read end File is opened, used …