Changing the plugin load path from a plugin-init.rb


I’m in the middle of converting one of my Rails-Apps to a plugin/
engine. Because this new plugin requires a lot of plugins I moved them
to RAILS_ROOT/vender/plugins/my_plugin/plugins and added

config.plugin_paths += %W( #{RAILS_ROOT}/vendor/plugins/my_plugin/
plugins )

to my RAILS_ROOT/config/environment.rb. To reduce the necessary logic
in the surrounding Railsapp I want to move this to my plugin too. To
put it in the init.rb of my plugin doesn’t work. Is there an other way
to set this paths??

Best regards, Mark

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs