Adding lib to 'config.autoload_paths' in Rails 3 does not autoload my module

后端 未结 6 2000
抹茶落季
抹茶落季 2020-11-28 02:52

I place a file name g.rb in side Rails.root/lib folder The file content is like this:

module Google
end

Then I add

         


        
6条回答
  •  萌比男神i
    2020-11-28 03:34

    Change config.autoload_paths to config.eager_load_paths

    (based on Rails issue #6850 and Force reload! from lib directory in rails 3.2 console)

提交回复
热议问题