stackoverflow.com

Rack has a limit for how many form parameters it will parse. This limit is 65536 by default.

makandracards.com

I posted a solution which is awesome and also does natural sorting.

Sometimes you need to remove high Unicode characters from a string, so all characters have a code point between 0...

makandra dev

Ruby 1.9.2 is very slow when loading files, especially starting Rails servers or running specs takes forever.

Always use simply require 'spec_helper' If you mix it up like require 'spec_helper' require File.dirname(__FILE__) + '/../spec_helper'

ActiveSupport >= 3 has Date.parse('2011-02-10').beginning_of_quarter #=> 2011-01-01 Date.parse('2011-02-10').end_of_quarter...

If you're suffering from a huge de.yml or similiar file, cry no more. Rails lets you freely organize your...

Why string sorting sucks in vanilla Ruby Ruby's sort method doesn't work as expected with special characters (like...

makandra dev
github.com

Introspect the Ruby Heap by indexing, counting, locating references to and detaching (in order to release) objects.

When using the asset pipeline your assets (images, javascripts, stylesheets, fonts) live in folders inside app: app/assets/fonts app/assets/images...

makandra dev
dzone.com

A collection of snippets to generate random number under certain conditions, as: gaussian with a specified distribution triangular distribution

makandra dev
github.com

Geoffrey Grosenbach has created Gruff for easily plotting graphs. It is written in pure Ruby and integrates with Rails applications...

ruby-toolbox.com

If you need a gem for a certain purpose, be sure to check this site. The rankings are determined by...

makandra dev

Consider the following HTML & CSS: ^ img { background-color: red; } div { border: 1px solid black; } This will leave a margin of...

If your project uses another version than your default Ruby, RubyMine will give you incorrect inspections, for example.\

When requests arrive at the application servers simultaneously, weird things can happen. Sometimes, this can also happen if a user...

objectmentor.com

Slides presenting ways to integrate the ideas of Aspect-Oriented Programming in Ruby. Outline Why Aspect-Oriented Programming?

If you get an error like this ... can’t find executable rails for rails-3.2.3 (Gem::Exception) ... one of several...

makandra dev
ocra.rubyforge.org

OCRA (One-Click Ruby Application) builds Windows executables from Ruby source code. The executable is a self-extracting, self-running...

Controller responses often include Javascript code that contains values from Ruby variables. E.g. you want to call a Javascript function...

weblog.jamisbuck.org

How to get a backtrace from a running Ruby process: Ruby 2.6 # First, find out the PID of your Ruby...

robots.thoughtbot.com

TL;DR {} binds stronger than do … end (as always in Ruby, special characters bind stronger than words) Demo

This card needs to be updated for Rails 3+. Since there is no --debugger flag you need to run:

The following two hints are taken from Github's Ruby style guide: If your regular expression mentions a lot of...