Create DB in production environment in rails
RAILS_ENV=production rake db:create
would create the database for the production
environment,
whereas
RAILS_ENV=production rake db:schema:load
would create tables and columns within the database according the schema.rb
for the production
environment.
task :load => [:environment, :load_config] do ActiveRecord::Tasks::DatabaseTasks.load_schema_current(:ruby, ENV['SCHEMA'])endtask :create => [:load_config] do ActiveRecord::Tasks::DatabaseTasks.create_currentend
Take a look at this file for complete info on the topic.