rod mclaughlin


Changing the name of a Rails 3+ app (20 jun 12)

It's quite a hassle. You can't just rename the folder in which it is located. You have to change the following files.

config/application.rb: module OldName
config/environment.rb: OldName::Application.initialize!
config/environments/development.rb: OldName::Application.configure do
config/environments/production.rb: OldName::Application.configure do
config/environments/test.rb: OldName::Application.configure do
config/initializers/secret_token.rb: OldName::Application.config.secret_token = 'f00baa'
config/initializers/session_store.rb:
                            OldName::Application.config.session_store 
                            :cookie_store, key: '_oldname_session'
config/initializers/session_store.rb:
                            # OldName::Application.config.session_store :active_record_store
config/routes.rb: OldName::Application.routes.draw do
config.ru: run OldName::Application
Rakefile: OldName::Application.load_tasks

In each of these files, you have to change OldName to NewName.

That's not very DRY, is it, David?

 

 



Back
Portland London