Changing Your Rails Project Name
December 15, 2013
A while ago I wanted to change a Rails project name. Since the project was well underway, it wasn’t easy to find the locations. Where does a project’s name appear in freshly generated code? (I studied this under Rails 4.0.0.rc1.)
I found that the project name appears in the following places:
app/views/layouts/application.html.erb : 4
config/application.rb : 9
config/database.yml : various
- The database names for all configurations (development, production, and test) are based on the project name.
- The usernames (if any) in all configurations are the project name.
config/environment.rb : 5
config/environments/*.rb : 1
All environment files start with: