Skip to content
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.

Commit

Permalink
fixed the default admin task not firing
Browse files Browse the repository at this point in the history
  • Loading branch information
James Cook committed Jan 30, 2009
1 parent 0aebf85 commit 32933f4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
7 changes: 0 additions & 7 deletions config/environment.rb
Expand Up @@ -21,13 +21,6 @@

require 'ansuz'

# All this stuff needs to run before the initializer block, else rails will barf if there is no database.yml
unless( File.exists?( File.join(RAILS_ROOT, "config", "database.yml") ) )
require File.join(RAILS_ROOT, "lib", "ansuz", "installer")
installer = Ansuz::Installer.new( RAILS_ENV )
installer.install
end

# Initialize the Ansuz Plugin Manager instance
Ansuz::PluginManagerInstance = Ansuz::PluginManager.new

Expand Down
11 changes: 6 additions & 5 deletions lib/ansuz/installer.rb
Expand Up @@ -92,23 +92,24 @@ def install
create_database
end

@stdout.puts "[ansuz] Migrating plugins .."
Kernel.silence_stream(@stdout) do
migrate_plugins
end

@stdout.puts "[ansuz] Migrating tables .."
Kernel.silence_stream(@stdout) do
migrate_database
end

@stdout.puts "[ansuz] Migrating plugins .."
Kernel.silence_stream(@stdout) do
migrate_plugins
end

# Create public/uploads directory for FCKeditor
create_fckeditor_uploads_dir

choose_theme
@state = :installation_complete



@stdout.puts "[ansuz] Finished! Start Ansuz with `script/server` on Linux or `ruby script/server` on Windows."
end

Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/ansuz.rake
Expand Up @@ -18,7 +18,7 @@ namespace :ansuz do
task(:install) do
@installer.create_db_config
@installer.install
Rake::Task["utils:create_admin"].invoke # We can't see the ActiveRecord stuff in the installer. What's up with that?
system("rake utils:create_admin")

STDOUT.puts "[ansuz] Finished! Start Ansuz with `script/server` on Linux or `ruby script/server` on Windows."
end
Expand Down

0 comments on commit 32933f4

Please sign in to comment.