diff options
Diffstat (limited to 'railties/bin/console')
-rw-r--r-- | railties/bin/console | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/railties/bin/console b/railties/bin/console index c64e2a3966..f381c7e964 100644 --- a/railties/bin/console +++ b/railties/bin/console @@ -3,7 +3,12 @@ if ARGV[0] ENV['RAILS_ENV'] = ARGV[0] puts "Loading environment..." - exec "irb -r config/environment.rb -r irb/completion --noinspect" + if RUBY_PLATFORM =~ /mswin32/ + irb_name = "irb.bat" + else + irb_name = 'irb' + end + exec "#{irb_name} -r config/environment.rb -r irb/completion --noinspect" else puts <<-HELP @@ -27,4 +32,4 @@ EXAMPLE and config/environments/production.rb). You would now be ready to start requiring models using require_dependency. HELP -end
\ No newline at end of file +end |