Ruby is 1.8.4
Engines is at revision 489 (its the latest one in svn at the time of
writing)
Rails is at 5719 (again latest one in svn at time of writing)
puts $LOAD_PATH
./script/../config/../config/../vendor/rails/actionwebservice/lib/action_web_service/vendor/
./script/../config/../config/../vendor/rails/actionmailer/lib/action_mailer/vendor/
./script/../config/../config/../vendor/rails/actionpack/lib/action_view/helpers/../../action_controller/vendor/html-scanner
./script/../config/../config/../vendor/rails/actionpack/lib/action_view/vendor
./script/../config/../config/../vendor/rails/actionpack/lib
./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/vendor
./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib
./script/../config/../config/../vendor/rails/activerecord/lib
script/../config/../config/../test/mocks/development
script/../config/../config/../app/controllers/
script/../config/../config/../app
script/../config/../config/../app/models
script/../config/../config/../app/controllers
script/../config/../config/../app/helpers
script/../config/../config/../components
script/../config/../config/../config
script/../config/../config/../lib
script/../config/../config/../vendor/plugins/numbat_rbac/lib
script/../config/../config/../vendor/plugins/redhillonrails_core/lib
script/../config/../config/../vendor/plugins/foreign_key_migrations/lib
script/../config/../config/../vendor/plugins/engines/lib
script/../config/../config/../vendor
script/../config/../config/../vendor/plugins/numbat_rbac/lib/
script/../config/../config/../vendor/plugins/engines/lib/
script/../config/../config/../vendor/plugins/foreign_key_migrations/lib/
script/../config/../config/../vendor/plugins/redhillonrails_core/lib/
/var/www/getadrafter.dyndns.org/trunk/vendor/rails/railties/builtin/rails_info/
script/../config/../config/../vendor/rails/railties
script/../config/../config/../vendor/rails/railties/lib
script/../config/../config/../vendor/rails/actionpack/lib
script/../config/../config/../vendor/rails/activesupport/lib
script/../config/../config/../vendor/rails/activerecord/lib
script/../config/../config/../vendor/rails/actionmailer/lib
script/../config/../config/../vendor/rails/actionwebservice/lib
/usr/local/lib/site_ruby/1.8
/usr/local/lib/site_ruby/1.8/x86_64-linux
/usr/local/lib/site_ruby
/usr/lib/ruby/1.8
/usr/lib/ruby/1.8/x86_64-linux
.
script/../config/../config/../vendor/plugins/numbat_rbac/app/models
script/../config/../config/../vendor/plugins/numbat_rbac/app/helpers
script/../config/../config/../vendor/plugins/numbat_rbac/app/controllers
=> nil
puts Dependencies.load_paths
script/../config/../config/../test/mocks/development
script/../config/../config/../app/controllers/
script/../config/../config/../app
script/../config/../config/../app/models
script/../config/../config/../app/controllers
script/../config/../config/../app/helpers
script/../config/../config/../components
script/../config/../config/../config
script/../config/../config/../lib
script/../config/../config/../vendor
script/../config/../config/../vendor/plugins/numbat_rbac/lib/
script/../config/../config/../vendor/plugins/engines/lib/
script/../config/../config/../vendor/plugins/foreign_key_migrations/lib/
script/../config/../config/../vendor/plugins/redhillonrails_core/lib/
/var/www/getadrafter.dyndns.org/trunk/vendor/rails/railties/builtin/rails_info/
script/../config/../config/../vendor/plugins/numbat_rbac/lib
script/../config/../config/../vendor/plugins/numbat_rbac/app/models
script/../config/../config/../vendor/plugins/numbat_rbac/app/helpers
script/../config/../config/../vendor/plugins/numbat_rbac/app/controllers
=> nil
puts ActionController::Routing.controller_paths
script/../config/../config/../app/controllers
script/../config/../config/../components
/var/www/getadrafter.dyndns.org/trunk/vendor/rails/railties/builtin/rails_info/
script/../config/../config/../vendor/plugins/numbat_rbac/app/controllers
script/../config/../config/../vendor/plugins/numbat_rbac/components
=> nil
Bear in mind, thats all after the modifications I made. With the changes
commented out, Dependencies.load_paths looks like this:
puts Dependencies.load_paths
script/../config/../config/../test/mocks/development
script/../config/../config/../app/controllers/
script/../config/../config/../app
script/../config/../config/../app/models
script/../config/../config/../app/controllers
script/../config/../config/../app/helpers
script/../config/../config/../components
script/../config/../config/../config
script/../config/../config/../lib
script/../config/../config/../vendor
script/../config/../config/../vendor/plugins/numbat_rbac/lib/
script/../config/../config/../vendor/plugins/engines/lib/
script/../config/../config/../vendor/plugins/foreign_key_migrations/lib/
script/../config/../config/../vendor/plugins/redhillonrails_core/lib/
/var/www/getadrafter.dyndns.org/trunk/vendor/rails/railties/builtin/rails_info/
=> nil
On 12/15/06, James Adam <[EMAIL PROTECTED]> wrote:
Hi James,
Can you check which versions of Rails/Ruby/Engines plugin you're
using? If you can also give a listing of your load paths (i.e. the
output of "puts $LOAD_PATH", "puts Dependencies.load_paths" and "puts
ActionController::Routing.controller_paths"), it would help me track
down what the issue might be.
- James
On 12/15/06, James Nelson <[EMAIL PROTECTED]> wrote:
> I was having a bit of trouble on the latest edge rails with my
controllers
> not being loaded, so I made a few changes to engines.rb in the engines
> plugin directory. Basically, on the last three references to $LOAD_PATH,
I
> added a line afterwards doing exactly the same thing with
> Dependencies.load_paths:
>
> # add these LAST on the load path.
> load_paths.reverse.each { |dir|
> if File.directory?(dir)
> Engines.log.debug "adding #{File.expand_path(dir)} to the load
> path"
> #$LOAD_PATH.push(File.expand_path(dir))
> $LOAD_PATH.push dir
> Dependencies.load_paths.push dir
> end
> }
>
> # Add the other engines back onto the bottom of the $LOAD_PATH.
Put
> them back on in
> # the same order.
> $LOAD_PATH.push(*old_plugin_paths)
> Dependencies.load_paths.push(*old_plugin_paths)
> $LOAD_PATH.uniq!
> Dependencies.load_paths.uniq!
>
> I'm sure this is utterly awful code, but it was just a quick fix to get
it
> working, since I don't know if the problem was with engines, rails or
me.
> I'm not sure whether I was doing something wrong in the first place to
make
> it so my controllers could not be found. I do know that the Dependencies
> module in active support didn't have the app directory for my engine in
its
> load path (the one I found by actually tracing the application's
execution),
> but by the same token, it _was_ in the application's load path earlier
in
> execution. The really weird things is the libs and models for my engine
> _were_ loading fine when the controllers weren't.
>
> Also, I can't tell if it was working previously and changed with an
update
> to the latest rails, as I only just added the controllers to my
application.
>
> --
> - James
> _______________________________________________
> engine-users mailing list
> [email protected]
>
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
>
>
>
--
* J *
~
_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org
--
- James
_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org