diff options
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/lib/action_mailer.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 2e324d4637..2a9210deb9 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -21,13 +21,13 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #++ -unless defined?(ActionController) - begin - $:.unshift "#{File.dirname(__FILE__)}/../../actionpack/lib" +begin + require 'action_controller' +rescue LoadError + actionpack_path = "#{File.dirname(__FILE__)}/../../actionpack/lib" + if File.directory?(actionpack_path) + $:.unshift actionpack_path require 'action_controller' - rescue LoadError - require 'rubygems' - gem 'actionpack', '>= 1.12.5' end end |