Thanks Fred for this clear feedback ...
I did it (added require 'yoodle.rb' in my initializers/configuration.rb)
and it works ...
:-)))
Le mercredi 21 novembre 2012 00:18:43 UTC+1, Frederick Cheung a écrit :
>
>
> 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/-/cA_CP7G50Z8J.
For more options, visit https://groups.google.com/groups/opt_out.