On Tuesday, November 20, 2012 4:46:56 PM UTC, Erwin wrote:
>
>
> and I have added in yoodle/config/application.rb
>     config.autoload_paths += Dir["#{config.root}/lib", 
> "#{config.root}/lib/**/"]
>
> but running in console
> > "AAA".to_squawk   raises an error
> NoMethodError: undefined method `to_squawk' for "AAA":String
>
>
>
autoload_paths is the set of paths that can be autoloaded - they won't 
actually be loaded on startup in development mode (although they would be 
in production).

The example in the doc is written from the point of view of writing the 
extension as part of a gem, in wich case lib/yaffle gets loaded for you by 
bundler. You seem to be adding this straight to your app, so you don't get 
this behaviour. The simplest thing is probably to add an initializer that 
requires yoodle.rb for you 

Fred

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/G9PBF8RJG2cJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to