Permalink
Browse files

Fix collation database task to use begin..rescue..end

  • Loading branch information...
1 parent 350e9c6 commit 4662c5f4effd829099d647a7a76c7044fcc68121 @carlosantoniodasilva carlosantoniodasilva committed Jun 30, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 activerecord/lib/active_record/railties/databases.rake
@@ -148,9 +148,11 @@ db_namespace = namespace :db do
# desc "Retrieves the collation for the current environment's database"
task :collation => [:environment, :load_config] do
- puts ActiveRecord::Tasks::DatabaseTasks.collation_current
- ensure NoMethodError
- $stderr.puts 'sorry, your database adapter is not supported yet, feel free to submit a patch'
+ begin
+ puts ActiveRecord::Tasks::DatabaseTasks.collation_current
+ rescue NoMethodError
+ $stderr.puts 'Sorry, your database adapter is not supported yet, feel free to submit a patch'
@sobrinho

sobrinho Jun 30, 2012

Contributor

$stderr is needed here?

@sobrinho

sobrinho Jun 30, 2012

Contributor

forgot, $stderr is not $stdout, my fault ;)

+ end
end
desc 'Retrieves the current schema version number'
@@ -269,7 +271,7 @@ db_namespace = namespace :db do
ENV['ISC_USER'] = config['username'].to_s if config['username']
ENV['ISC_PASSWORD'] = config['password'].to_s if config['password']
end
-
+
def firebird_db_string(config)
FireRuby::Database.db_string_for(config.symbolize_keys)
end

0 comments on commit 4662c5f

Please sign in to comment.