Codeship 不适用于 Rails 多元宇宙 gem
Codeship doesn't work with Rails multiverse gem
本地所有测试都通过了,但我无法在 Codeship 上获得 rspec 到 运行:
脚本:
bundle exec rake db:drop db:create db:migrate
DB=catalog bundle exec rake db:drop db:create db:migrate
DB=catalog bundle exec rails db:test:prepare
bundle exec rspec
编码错误:
Failure/Error: establish_connection :"catalog_#{Rails.env}"
ActiveRecord::AdapterNotSpecified:
'catalog_test' database is not configured. Available: ["development", "test"]
ActiveRecord::ConnectionNotEstablished:
No connection pool with 'CatalogRecord' found.
database.yml:
.
.
.
catalog_development:
<<: *default
database: catalog_development
catalog_test:
<<: *default
database: catalog_test
目录记录
class CatalogRecord < ActiveRecord::Base
self.abstract_class = true
establish_connection :"catalog_#{Rails.env}"
end
Rails 个 CodeShip Basic 项目将 have their database.yml file overwritten in order to connect to default databases。我会查看有关 re-asserting 您自己的 database.yml
变体的链接文档。
本地所有测试都通过了,但我无法在 Codeship 上获得 rspec 到 运行:
脚本:
bundle exec rake db:drop db:create db:migrate
DB=catalog bundle exec rake db:drop db:create db:migrate
DB=catalog bundle exec rails db:test:prepare
bundle exec rspec
编码错误:
Failure/Error: establish_connection :"catalog_#{Rails.env}"
ActiveRecord::AdapterNotSpecified:
'catalog_test' database is not configured. Available: ["development", "test"]
ActiveRecord::ConnectionNotEstablished:
No connection pool with 'CatalogRecord' found.
database.yml:
.
.
.
catalog_development:
<<: *default
database: catalog_development
catalog_test:
<<: *default
database: catalog_test
目录记录
class CatalogRecord < ActiveRecord::Base
self.abstract_class = true
establish_connection :"catalog_#{Rails.env}"
end
Rails 个 CodeShip Basic 项目将 have their database.yml file overwritten in order to connect to default databases。我会查看有关 re-asserting 您自己的 database.yml
变体的链接文档。