2 desc 'Pre-load edge rails ActiveRecord'
4 unless path = ENV['EDGE_RAILS_DIR'] || ENV['EDGE_RAILS']
7 Need to define env var EDGE_RAILS_DIR or EDGE_RAILS- root of edge rails on your machine.
8 i) Get copy of Edge Rails - http://dev.rubyonrails.org
9 ii) Set EDGE_RAILS_DIR to this folder in local/paths.rb - see local/paths.rb.sample for example
11 a) Set folder from environment or command line (rake ar:edge EDGE_RAILS_DIR=/path/to/rails)
17 ENV['AR_LOAD_PATH'] = File.join(path, "activerecord/lib")
20 desc 'Pre-load ActiveRecord using VERSION=X.Y.Z, instead of latest'
22 unless version = ENV['VERSION']
24 Usage: rake ar:get_version VERSION=1.15.3
25 Specify the version number with VERSION=X.Y.Z; and make sure you have that activerecord gem version installed.
29 version = nil if version == "" || version == []
31 version ? gem('activerecord', version) : gem('activerecord')
32 require 'active_record'
33 ENV['AR_LOAD_PATH'] = $:.reverse.find { |path| /activerecord/ =~ path }
36 Missing: Cannot find activerecord #{version} installed.
37 Install: gem install activerecord -v #{version}