1

CI に codeship を使用しようとすると、奇妙なエラーが発生します。

エラー:

DEPRECATION WARNING: Passing a string to ActiveRecord::Base.establish_connection for a configuration lookup is deprecated, please pass a symbol (:"") instead. (called from block in tsort_each at /home/rof/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/tsort.rb:226)
rake aborted!
ActiveRecord::AdapterNotSpecified: '' database is not configured. Available: ["development", "test", "production"]

コードシップでのセットアップ コマンド:

rvm use 2.2.0 --install
bundle install
export RAILS_ENV=test
bundle exec rake db:schema:load <----- error begins here, tried adding RAILS_ENV=test which didn't resolve

私のデータベース.yml

development:
  adapter: postgresql
  encoding: utf8
  database: appname_development
  username: postgres
  password: postgres


test:
  adapter: postgresql
  encoding: utf8
  database: appname_test
  username: postgres
  password: postgres

production:
  database: appname_production
  url: <%= ENV['HEROKU_POSTGRESQL_BLACK_URL'] %>
  pool: <%= ENV['DB_POOL'] || ENV['MAX_THREADS'] || 5 %>
4

0 に答える 0