aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib')
-rw-r--r--activerecord/lib/active_record.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb
index f4303f3f04..2f9f1f120c 100644
--- a/activerecord/lib/active_record.rb
+++ b/activerecord/lib/active_record.rb
@@ -21,17 +21,19 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++
-activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib"
-$:.unshift(activesupport_path) if File.directory?(activesupport_path)
-require 'active_support'
+bundled = "#{File.dirname(__FILE__)}/../../vendor/gems/environment"
+if File.exist?("#{bundled}.rb")
+ require bundled
+else
+ activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib"
+ $:.unshift(activesupport_path) if File.directory?(activesupport_path)
-begin
- require 'active_model'
-rescue LoadError
- $:.unshift "#{File.dirname(__FILE__)}/../../activemodel/lib"
- require 'active_model'
+ activemodel_path = "#{File.dirname(__FILE__)}/../../activemodel/lib"
+ $:.unshift(activemodel_path) if File.directory?(activemodel_path)
end
+require 'active_support'
+require 'active_model'
require 'arel'
module ActiveRecord