From a552966f4547181d56efc82b9a5233a7291cb199 Mon Sep 17 00:00:00 2001 From: Artem Sheremet Date: Wed, 27 Feb 2013 16:39:54 +0300 Subject: [PATCH] not stopping pry if rails fails --- .pryrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.pryrc b/.pryrc index 90fda93..c1b3a02 100644 --- a/.pryrc +++ b/.pryrc @@ -8,8 +8,12 @@ Pry.plugins["doc"].activate! rails = File.join Dir.getwd, 'config', 'environment.rb' if File.exist?(rails) && ENV['SKIP_RAILS'].nil? - require rails - + begin + require rails + rescue SystemExit + raise "an attempt to load rails resulted in #{$!.class} call" + end + if Rails.version[0..0] == "2" require 'console_app' require 'console_with_helpers'