I have been having major issues with resource_controller loading
as a gem dependency. The problem is that when active support tries
to load the gem, it comes up with a crazy constant name like this
one:
Gems::ResourceController-0.5.3::Lib
It is difficult to diagnose, and regression test, since it's
heavily dependent on the circumstances:
- With the gem installed on the system, it never happens (unless
rails version >= 2.1.1).
- It never ever happens in test mode.
I have tried manually requiring all the files in
resource_controller to make sure that the consts are never missing,
as a workaround, but since I need ApplicationController in r_c, it
seems to create a lot of conflicts.
I have narrowed the issue down to this load path being present
in my Dependencies.load_paths
RAILS_ROOT/vendor
with Dependencies' logging turned on, I can see that it tries to
load the const properly from:
RAILS_ROOT/vendor/gems/resource_controller-0.5.3/lib
but also from the above path:
e.g.
Dependencies: called
load_file("/Users/james/Documents/railsApps/po_creator/vendor/gems/resource_controller-0.5.3/lib/urligence.rb",
["Urligence",
"Gems::ResourceController-0.5.3::Lib::Urligence"])
If I delete RAILS_ROOT/vendor from the load_paths, everything
works fine, but I'm not sure whether that path is necessary, so I
don't want to ship a version of r_c that deletes it.
It is there in test mode, but doesn't seem to cause the problem.
Anybody have any ideas?