lib/versioned_seeds/utils.rb in versioned_seeds-0.5.0 vs lib/versioned_seeds/utils.rb in versioned_seeds-0.5.1
- old
+ new
@@ -3,10 +3,10 @@
if defined?(Rails)
def self.load_sql(path)
sql_file = VersionedSeeds.root_path + 'db/seeds/' + path
db_password = db_config['password']
- system "RAILS_ENV=#{Rails.env} bundle exec rails dbconsole -p #{db_password} < #{sql_file}"
+ system "RAILS_ENV='#{Rails.env}' bundle exec rails dbconsole -p '#{db_password}' < '#{sql_file}'"
end
def self.db_config
@db_config = Rails.application.config.database_configuration[Rails.env]
end