This project is archived and is in readonly mode.

#6537 new
jmoses

Loading a helper that generates a load error gives a confusing error message

Reported by jmoses | March 6th, 2011 @ 01:54 AM

If you have a helper that require's a file that doesn't exist, you get an error message that is confusing, and wrong.

file: app/helpers/example_helper.rb

require 'md5'
module ExampleHelper
end

will generate an error like:

/Users/jmoses/.rvm/gems/ruby-1.9.2-p136@gemset/gems/activesupport-3.0.4/lib/active_support/dependencies.rb:304:in rescue in depend_on': Missing helper file helpers/md5.rb (LoadError) from /Users/jmoses/.rvm/gems/ruby-1.9.2-p136@shotrunner/gems/activesupport-3.0.4/lib/active_support/dependencies.rb:299:independ_on'

Where the 'md5' above is replaced by whatever file can't be found. It's confusing, and incorrect, it should either bubble the load error up, or indicate there's an error in that particular helper.

No comments found

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages