Wednesday, April 4, 2012

How to rename Rails3 application

A Rails3 application name are using as a Ruby name space for entire application and throughout the project tree as well. So, If anyone later decide to change the project name, then have to replace the name in the following files:
Rakefile
config.ru
config/routes.rb
config/application.rb
config/environment.rb
config/environments/development.rb
config/environments/test.rb
config/environments/production.rb
initializers/secret_token.rb
initializers/session_store.rb

You can run following command in your project root, to find out the list of files containing project name(assume you are using linux):
grep -Ri 'AppName' * | cut -f1 -d':' | sort | uniq

You can use following gem to rename rails3 application without any hassle:

No comments:

Post a Comment