This can be accomplished by putting the following code in your config file (e.g. production.rb, development.rb, test.rb, application.rb, etc.)
require 'bcrypt'
BCrypt::Engine::DEFAULT_COST = 12
Note that you can check your password digests to see what cost factor was used when encrypting them. E.g. in
$2a$12$k50jCqk8Bijj.wYxg69QBOg.t4VNMj/VmSkPCfeWWoOW
the cost factor is 12
the number immediately following the second $