heithem nouira
2011-Mar-28 23:04 UTC
undefined method "load_paths" for ActiveSupport::Dependencies:Module Error
I''m writing a Rails plugin from scratch and recently generating models
inside it.
In fact, i''m trying to follow the guide from
http://guides.rubyonrails.org/plugins.html
so i used the following code taken from this site in order to make the
models appear like files in the main app directory (as it was said)
this is the code:
%w{ models }.each do |dir|
path = File.join(File.dirname(__FILE__), ''app'', dir)
$LOAD_PATH << path
ActiveSupport::Dependencies.load_paths << path
ActiveSupport::Dependencies.load_once_paths.delete(path)
end
__________________________________________________________
When i run ''rails console '' this error appear
undefined method `load_paths'' for ActiveSupport::Dependencies:Module
(NoMethodError)
thanks for your help
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
