You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in /lib/resource_controller.rb
Lines:
begin
require_dependency 'application_controller'
rescue LoadError => e
require_dependency 'application'
end
The problem with this sort of check is that if you have a load error that has nothing to do with the application_controller v.s. application renamed dependency (say you defined a helper wrong etc.), then the true error is hidden and you get a no such file to load - application error instead.
To reproduce, use the latest rc as a plugin or a gem, create a model, controller, helper, etc. file and declare it wrong. I.e. post_help.rb but declared as "module OopsHelper". This is a pretty contrived example, but the point is, the way rc uses rescue on LoadError means your app hides any meaningful error messages that may occur on load, forcing you to edit rc and comment out those lines to figure out what the actual error was.
The text was updated successfully, but these errors were encountered:
in /lib/resource_controller.rb
Lines:
begin
require_dependency 'application_controller'
rescue LoadError => e
require_dependency 'application'
end
The problem with this sort of check is that if you have a load error that has nothing to do with the application_controller v.s. application renamed dependency (say you defined a helper wrong etc.), then the true error is hidden and you get a no such file to load - application error instead.
To reproduce, use the latest rc as a plugin or a gem, create a model, controller, helper, etc. file and declare it wrong. I.e. post_help.rb but declared as "module OopsHelper". This is a pretty contrived example, but the point is, the way rc uses rescue on LoadError means your app hides any meaningful error messages that may occur on load, forcing you to edit rc and comment out those lines to figure out what the actual error was.
The text was updated successfully, but these errors were encountered: