Reputation: 735
How to change your project name in ruby on rails ? while u create a project name of project is scattered in below files In Rails 3, there are references to the application name in the following files:
config/application.rb
config/environment.rb
config/environments/development.rb
config/environments/production.rb
config/environments/test.rb
config/initializers/secret_token.rb
config/initializers/session_store.rb
config/mongoid.yml (if using Mongoid)
config/routes.rb
config.ru
Rakefile
app/views/layouts/application.html.erb, in title tag
Is there any command to replace the name of project in all these files?
Upvotes: 0
Views: 783
Reputation: 2694
Use rename
For Rails 5/4.x
#Gemfile
gem `rename`
#Command prompt
rails g rename:into NewAppName
For Rails 3
rails plugin install git://github.com/get/Rename.git
rails g rename_to SweetNewName
Upvotes: 0
Reputation: 107718
There is not a command to replace the name in all those files. You will need to do it manually.
Upvotes: 1
Reputation: 2653
For this follow links below
http://gkunwar1.wordpress.com/2012/07/03/rails-tips/
Hope this may help you.
Upvotes: 1