yehudakatz.com

When running an executable, ALWAYS use bundle exec. In some cases, running executables without bundle exec may work, if the...

blog.jayfields.com

Deprecated ways to execute shell code in Ruby This is just a reference for legacy code. For new code, always...

When your cucumber features grow massively over time, the test execution can take a lot of time.

Soon after having written our shell-for script, we wanted to easily get dumps of our productions machines, too. This...

makandra dev
github.com

After having written useful scripts into makandra notes for a long time, we’ve now tied them into a powerful...

Recent versions of the Faker gem retrieve their strings from your locale file (e.g. config/locale/de.yml). This leads to awesome errors...

apt-get install libcurl3-dev

Since May 2011 we are cutting new gems using Bundler, which is less painful than cutting gems using Jeweler. You...

This is an awful way to test whether a number is shown on the screen: Then I should see "5...

weblog.rubyonrails.org

Asset pipeline, HTTP streaming, jQuery as default framework, auto-reversable migrations, identity map for ActiveRecord. Ruby 1.8.x support will...

Today I needed to execute a ruby gem executable with sudo. But, surprisingly, bash would tell me command not found...

makandra dev

Before installing chef, make sure curl is installed and sudo finds your gems setup chef-client: follow this guide

We regularly need to connect to the server in order to e.g. access the production console. Guessing the Capistrano deploy...

makandra dev

When you simply want to get to know Puppet, follow puppetlabs’ Learning Puppet Docs. They give you a handy introduction...

Although regular expression syntax is 99% interchangeable between languages, keep this in mind: By default, the dot character (".") does not...

We recently decided to put static content for HouseTrip.com to Amazon Cloudfront for a faster user experience. This happens fully...

makandra dev

You know that you can collect an array as groups using in_groups or in_groups_of. Maybe you want...

Run rspec-and-cucumber from any project directory to run both RSpec and Cucumber. If available, rspec_spinner or cucumber...

github.com

Whenever is a Ruby gem that provides a clear syntax for writing and deploying cron jobs.

makandra dev

Validations that need to access an associated object may lead to some trouble. Let's exemplify that using this example...

Ruby comes with a class BigDecimal which you can use for arbitrary precision arithmetic. You should use BigDecimal instead of...

When storing floating-point numbers such as prices or totals in an SQL database, always use a DECIMAL column. Never...

nex-3.com

Sass now comes with user-defined functions, keyword arguments, list manipulation. Haml and Sass are now two separate gems.

The Edge Rider gem will define a method collect_ids on your ActiveRecord models, scopes, integer scalars and collections, which...