aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-01-10 23:47:32 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-01-10 23:47:32 +0000
commit59c2a4d51194058153b741b8682b1dd1b5e93939 (patch)
tree6ededae303a0e1e361df2ac6fc043f22f6054ee8 /railties
parenta133f3e64f927780d4eac062ba996dffc174431a (diff)
downloadrails-59c2a4d51194058153b741b8682b1dd1b5e93939.tar.gz
rails-59c2a4d51194058153b741b8682b1dd1b5e93939.tar.bz2
rails-59c2a4d51194058153b741b8682b1dd1b5e93939.zip
Fixed script/console to work with Windows (that requires the use of irb.bat) #418 [octopod]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@375 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/bin/console9
2 files changed, 9 insertions, 2 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index d14ec8fa12..bf27ddaa9b 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed script/console to work with Windows (that requires the use of irb.bat) #418 [octopod]
+
* Fixed WEBrick servlet slowdown over time by restricting the load path reloading to mod_ruby
* Removed Fancy Indexing as a default option on the WEBrick servlet as it made it harder to use various caching schemes
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