progfu.com

I am talking about development speed. When your application starts growing and you start adding gems, it starts to take...

makandra dev
github.com

The gem author Jonas Nicklas highlights in a Google Groups post that the release is not backwards compatible to 1...

makandra dev

The very useful andand gem does not play very nice with Ruby's SimpleDelegator (or vice versa). This following will...

When you have two models in a has_many, has_one or belongs_to association, the :inverse_of option in...

Capybara gives you two different methods for executing Javascript: page.evaluate_script("$('input').focus()") page.execute_script("$('input').focus()")

Rarely, you might want to rebuild all gems with native extensions, because they might be compiled against outdated system libraries...

stackoverflow.com

url = 'http://www.foocorp.com/foo/bar' URI.parse(url).host # => www.foocorp.com Note that this will raise an error if the given argument is...

If you require your Rails models manually, pay attention to the path you use. Unless you have...

makandra dev
speakerdeck.com

The linked slidedeck holds many tips, of which I list the most interesting to me below DATA and END

shifteleven.com

The __END__ keyword tells Ruby where a file ends – but you don't have to stop there. Any text you...

Ruby's mathn library changes Fixnum division to work with exact Rationals, so 2 / 3 => 0 2 / 3 * 3 => 0...

Simply use OpenStruct#to_h to receive an OpenStruct's hash representation. In older Rubies you need OpenStruct#marshal_dump...

Ever wanted autocompletion for paths from paths.rb in Cucumber? This card lets you write your steps like this:

In a nutshell: return statements inside blocks cause a method's return value to change. This is by design (and...

If you get errors from your development WEBrick that contain unicode salad, you are probably requesting the page via SSL...

With the the ruby Tempfile class you can create temporary files. Those files only stick around as long as you...

RubyMine: Set specific Ruby version per project

I was experiencing the following problem: It seems your ruby installation is missing psych (for YAML output). To eliminate this...

You can use String#demodulize from ActiveSupport: "ActiveRecord::CoreExtensions::String::Inflections".demodulize # => "Inflections" "Inflections".demodulize # => "Inflections"

makandra dev

Consul 0.4.0 comes with some new features. Dependencies Consul no longer requires assignable_values, it's optional for when you...

Today, I ran into trouble on a fairly fresh installed VM, running Ubuntu. I tried to bundle install and got...

When refactoring a sequence of steps to a new, more descriptive step, you can use the steps method and Ruby...

makandra dev
ruby-lang.org

It's the last bugfix release. We will get another year of security fixes, then no more patches.

ActiveSupport::Memoizable will be removed from Rails and has a lot of strange caveats that will ruin your day.