On Friday, 8 June 2012 08:54:19 UTC-4, Zeck wrote: > > I new to rails. I have a setup in the lib directory like so: > > lib/ > blog/ > core/ > search/ > base.rb > > The base.rb defines the Base class as well: > > module Blog > module Core > module Search > class Base > > attr_accessor :properties > > def initialize(params) > @properties = {} > end > end > end > end > end > > I have the following code in my application.rb > > config.autoload_paths += Dir["#{config.root}/lib/**/"] > > > Try just adding lib/ to autoload_paths - the ** part is tripping it up, so it's deciding that your file should define 'Base', not Blog::Core::Search::Base.
BTW, if you're new to Rails you may want to try learning it more idiomatically before dumping a jumbo-sized bucket of OO overdesign on it with all these modules... --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/0tVtoR5Z7xUJ. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.