直接重命名会有问题吗?
# rename a rails 4.1.x application with three files
# config/application.rb
require File.expand_path('../boot', __FILE__)
require 'rails/all'
Bundler.require(*Rails.groups)
module YourApplicationName # <-- rename it here
class Application < Rails::Application
end
end
# config/initializers/session_store.rb
Rails.application.config.session_store :cookie_store, key: '_your_application_name_session' # <-- rename the key
# database.yml
# database name
gem 'rename' 然后 bundle 然后 rails g rename:app_to name_of_app 如果使用 mongoid 需要更改数据库名字 config/mongoid.yml