Skip to content

Commit

Permalink
config[:database] should be a string
Browse files Browse the repository at this point in the history
This change was breaking the Railties tests. See
https://travis-ci.org/rails/rails/jobs/9865969
  • Loading branch information
rafaelfranca committed Aug 5, 2013
1 parent 9281adc commit b6c971e
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -18,9 +18,9 @@ def sqlite3_connection(config)
# the database path is not the special path that tells # the database path is not the special path that tells
# Sqlite to build a database only in memory. # Sqlite to build a database only in memory.
if ':memory:' != config[:database] if ':memory:' != config[:database]
config[:database] = Pathname.new(config[:database]) config[:database] = File.expand_path(config[:database], Rails.root) if defined?(Rails.root)
config[:database] = config[:database].expand_path(Rails.root) if defined?(Rails.root) dirname = File.dirname(config[:database])
config[:database].dirname.mkdir unless config[:database].dirname.directory? Dir.mkdir(dirname) unless File.directory?(dirname)
end end


db = SQLite3::Database.new( db = SQLite3::Database.new(
Expand Down

0 comments on commit b6c971e

Please sign in to comment.