Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapting plugins error? #11

Open
bigtunacan opened this issue Jan 6, 2016 · 0 comments
Open

Adapting plugins error? #11

bigtunacan opened this issue Jan 6, 2016 · 0 comments

Comments

@bigtunacan
Copy link

In the section on adapting plugins (https://github.com/alindeman/upgradingtorails4/blob/master/text/05_plugins.markdown) it describes setting up an initializer for the plugin and updating autoload_paths in the initializer as follows.

ActiveSupport::Dependencies.autoload_paths << "#{Rails.root}/lib/acts_as_tree/lib"

Trying to require a file that resides in the modified autoload_paths does not get loaded correctly. If I move the autoload_paths modification into the application config file however it works fine.

I noticed in the Rails Guides on autoloading availability (http://guides.rubyonrails.org/autoloading_and_reloading_constants.html#autoloading-availability) the following is mentioned.

config.autoload_paths is accessible from environment-specific configuration files, but any changes made to it outside config/application.rb don't have an effect.

Possibly this was locked down due to security concerns?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant