rails/rails — pull request #11259 by adamcrown (2013-07-02 22:43:23+00:00)
Title: When LoadError#path is nill grab path from message.

Before Ruby 2.0 `LoadError#path` always pulled the path out of
`LoadError#message`. In Ruby 2.0 the built-in `#path` method is used but it
sometimes returns `nil`. In that case it's best to fall back on the old
method of grabbing it from the `#message`.

Why `LoadError#path` returns nil has been hard to nail down but here is a
[real-world example](https://github.com/adamcrown/rails4-rspec-guard-spork)

Just clone and run `bundle exec guard` and you'll see the error.