diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-26 03:29:09 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-26 03:29:09 +0000 |
commit | 45e59c8a51a152d5f0b915924d2862d737b71c75 (patch) | |
tree | 980ad21ebd70e84b2bb40366d1fc4499cd0640eb /railties | |
parent | 6636eb16c56a8a44be8fb3ec005cfca52b0b5b4c (diff) | |
download | rails-45e59c8a51a152d5f0b915924d2862d737b71c75.tar.gz rails-45e59c8a51a152d5f0b915924d2862d737b71c75.tar.bz2 rails-45e59c8a51a152d5f0b915924d2862d737b71c75.zip |
Dont require rake to run the server, just have a little undryness instead (closes #4213) [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4037 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/commands/server.rb | 8 | ||||
-rw-r--r-- | railties/lib/tasks/tmp.rake | 5 |
2 files changed, 3 insertions, 10 deletions
diff --git a/railties/lib/commands/server.rb b/railties/lib/commands/server.rb index c9627439e8..82a3e1083f 100644 --- a/railties/lib/commands/server.rb +++ b/railties/lib/commands/server.rb @@ -1,4 +1,5 @@ require 'active_support' +require 'fileutils' begin require_library_or_gem 'fcgi' @@ -25,10 +26,5 @@ else puts "=> Booting lighttpd (use 'script/server webrick' to force WEBrick)" end -require_library_or_gem 'rake' -load File.join(File.dirname(__FILE__), "..", "tasks", "tmp.rake") -begin - Rake::Task['tmp:create'].execute -rescue Errno::EEXIST => e -end +FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets )) require "commands/servers/#{server}" diff --git a/railties/lib/tasks/tmp.rake b/railties/lib/tasks/tmp.rake index 70298687f9..643b67e6ec 100644 --- a/railties/lib/tasks/tmp.rake +++ b/railties/lib/tasks/tmp.rake @@ -4,10 +4,7 @@ namespace :tmp do desc "Creates tmp directories for sessions, cache, and sockets" task :create do - FileUtils.mkdir "tmp" - FileUtils.mkdir "tmp/sessions" - FileUtils.mkdir "tmp/cache" - FileUtils.mkdir "tmp/sockets" + FileUtils.mkdir_p(%w( tmp/sessions tmp/cache tmp/sockets )) end namespace :sessions do |