Skip to content
This repository
Browse code

Put lib back on the autoload path

  • Loading branch information...
commit 02a5842cd09bd75de4c2fdb6b474c6c0ff163ebf 1 parent c0fa4de
Yehuda Katz authored August 03, 2010
2  railties/lib/rails/engine/configuration.rb
@@ -20,7 +20,7 @@ def paths
20 20
           "app/models",          :eager_load => true
21 21
          "app/mailers",         :eager_load => true
22 22
-          paths.lib                 "lib",                 :load_path => true
+          paths.lib                 "lib",                 :eager_load => true
24 24
           paths.lib.tasks           "lib/tasks",           :glob => "**/*.rake"
25 25
           paths.config              "config"
26 26
           paths.config.initializers "config/initializers", :glob => "**/*.rb"

7 notes on commit 02a5842

Victor Costan

I see that lib is eager-loaded now. So I'll have to reboot my server whenever I change something there?

Samuel Kadolph

Eager-loaded files are unloaded the same. Now your code inside of lib will crash immediately (as well as trigger lazy load hooks which might not be desired.)

Jacques Crocker

causing some issue with devise:

guess this will cause major issues with lots of other libraries...

Larry Sprock

What is the difference between this behavior and previous behavior (before lib wasn't in the load path)? I'm a bit confused. I assume that before beta.4 the lib was loaded just like this. Right?

Samuel Kadolph

No, the lib folder was auto-loaded just like any folder in app.
Now because it's being eager-loaded, there are going to be problems.

Larry Sprock

Wow Samuel, thanks for clarifying the difference. The sky is falling! The sky is falling!

Samuel Kadolph

Indeed, which is why I agree with josevalim's revert until it's properly added to auto-loaded paths.

Please sign in to comment.
Something went wrong with that request. Please try again.