Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 4662c5f4effd829099d647a7a76c7044fcc68121 1 parent 350e9c6
Carlos Antonio da Silva carlosantoniodasilva authored
Showing with 6 additions and 4 deletions.
  1. +6 −4 activerecord/lib/active_record/railties/databases.rake
10 activerecord/lib/active_record/railties/databases.rake
View
@@ -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'

$stderr is needed here?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ 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
Please sign in to comment.
Something went wrong with that request. Please try again.