config[:database] should be a string

This change was breaking the Railties tests. See
https://travis-ci.org/rails/rails/jobs/9865969
上级 9281adc6
......@@ -18,9 +18,9 @@ def sqlite3_connection(config)
# the database path is not the special path that tells
# Sqlite to build a database only in memory.
if ':memory:' != config[:database]
config[:database] = Pathname.new(config[:database])
config[:database] = config[:database].expand_path(Rails.root) if defined?(Rails.root)
config[:database].dirname.mkdir unless config[:database].dirname.directory?
config[:database] = File.expand_path(config[:database], Rails.root) if defined?(Rails.root)
dirname = File.dirname(config[:database])
Dir.mkdir(dirname) unless File.directory?(dirname)
end
db = SQLite3::Database.new(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册