Skip to content

Commit

Permalink
run the gemfile customization and bundle install BEFORE the database …
Browse files Browse the repository at this point in the history
…tasks, because the db:create relies on the bundle having been run already when it creates the db
  • Loading branch information
mjankowski committed Apr 4, 2012
1 parent 315b0a5 commit 794c415
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions lib/suspenders/generators/app_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def suspenders_customization
invoke :create_suspenders_views
invoke :create_common_javascripts
invoke :add_jquery_ui
invoke :setup_database
invoke :customize_gemfile
invoke :setup_database
invoke :configure_app
invoke :setup_stylesheets
invoke :copy_miscellaneous_files
Expand Down Expand Up @@ -73,14 +73,6 @@ def add_jquery_ui
build(:add_jquery_ui)
end

def setup_database
say "Setting up database"
if 'postgresql' == options[:database]
build(:use_postgres_config_template)
end
build(:create_database)
end

def customize_gemfile
build(:include_custom_gems)
if options[:clearance]
Expand All @@ -89,6 +81,14 @@ def customize_gemfile
bundle_command('install')
end

def setup_database
say "Setting up database"
if 'postgresql' == options[:database]
build(:use_postgres_config_template)
end
build(:create_database)
end

def configure_app
say "Configuring app"
build(:configure_rspec)
Expand Down

0 comments on commit 794c415

Please sign in to comment.