diff --git a/bin/setup b/bin/setup index 8d71fa79..d8b8be49 100755 --- a/bin/setup +++ b/bin/setup @@ -23,7 +23,11 @@ FileUtils.chdir APP_ROOT do end puts "\n== Preparing database ==" - system! 'bin/rails db:prepare' + if ENV["CI"] + system! 'RAILS_ENV=test bin/rails db:prepare' + else + system! 'bin/rails db:prepare' + end puts "\n== Removing old logs and tempfiles ==" system! 'bin/rails log:clear tmp:clear' diff --git a/db/schema.rb b/db/schema.rb index b65a5df1..41e39777 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -2,8 +2,8 @@ # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # -# This file is the source Rails uses to define your schema when running `rails -# db:schema:load`. When creating a new database, `rails db:schema:load` tends to +# This file is the source Rails uses to define your schema when running `bin/rails +# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to # be faster and is potentially less error prone than running all of your # migrations from scratch. Old migrations may fail to apply correctly if those # migrations use external dependencies or application code.