Skip to content
This repository
Browse code

Fixed script/console to work with Windows (that requires the use of i…

…rb.bat) #418 [octopod]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@375 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 59c2a4d51194058153b741b8682b1dd1b5e93939 1 parent a133f3e
David Heinemeier Hansson dhh authored

Showing 2 changed files with 9 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 0  railties/CHANGELOG
  2. +7 2 railties/bin/console
2  railties/CHANGELOG
... ... @@ -1,5 +1,7 @@
1 1 *SVN*
2 2
  3 +* Fixed script/console to work with Windows (that requires the use of irb.bat) #418 [octopod]
  4 +
3 5 * Fixed WEBrick servlet slowdown over time by restricting the load path reloading to mod_ruby
4 6
5 7 * Removed Fancy Indexing as a default option on the WEBrick servlet as it made it harder to use various caching schemes
9 railties/bin/console
@@ -3,7 +3,12 @@
3 3 if ARGV[0]
4 4 ENV['RAILS_ENV'] = ARGV[0]
5 5 puts "Loading environment..."
6   - exec "irb -r config/environment.rb -r irb/completion --noinspect"
  6 + if RUBY_PLATFORM =~ /mswin32/
  7 + irb_name = "irb.bat"
  8 + else
  9 + irb_name = 'irb'
  10 + end
  11 + exec "#{irb_name} -r config/environment.rb -r irb/completion --noinspect"
7 12 else
8 13 puts <<-HELP
9 14
@@ -27,4 +32,4 @@ EXAMPLE
27 32 and config/environments/production.rb). You would now be ready to start requiring
28 33 models using require_dependency.
29 34 HELP
30   -end
  35 +end

0 comments on commit 59c2a4d

Please sign in to comment.
Something went wrong with that request. Please try again.