Skip to content
This repository
Browse code

Dont require rake to run the server, just have a little undryness ins…

…tead (closes #4213) [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4037 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 45e59c8a51a152d5f0b915924d2862d737b71c75 1 parent 6636eb1
David Heinemeier Hansson authored March 26, 2006
8  railties/lib/commands/server.rb
... ...
@@ -1,4 +1,5 @@
1 1
 require 'active_support'
  2
+require 'fileutils'
2 3
 
3 4
 begin
4 5
   require_library_or_gem 'fcgi'
@@ -25,10 +26,5 @@
25 26
   puts "=> Booting lighttpd (use 'script/server webrick' to force WEBrick)"
26 27
 end
27 28
 
28  
-require_library_or_gem 'rake'
29  
-load File.join(File.dirname(__FILE__), "..", "tasks", "tmp.rake")
30  
-begin
31  
-  Rake::Task['tmp:create'].execute 
32  
-rescue Errno::EEXIST => e 
33  
-end
  29
+FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets ))
34 30
 require "commands/servers/#{server}"
5  railties/lib/tasks/tmp.rake
@@ -4,10 +4,7 @@ namespace :tmp do
4 4
 
5 5
   desc "Creates tmp directories for sessions, cache, and sockets"
6 6
   task :create do
7  
-    FileUtils.mkdir "tmp"
8  
-    FileUtils.mkdir "tmp/sessions"
9  
-    FileUtils.mkdir "tmp/cache"
10  
-    FileUtils.mkdir "tmp/sockets"
  7
+    FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets ))
11 8
   end
12 9
 
13 10
   namespace :sessions do

0 notes on commit 45e59c8

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