I have a Ruby on Rails application that was created using:
rails new old_name -d mysql
Now I want to change the application name to be new_name
.
Just changing the application folder name will not be enough, because the database name, for example, also has to be changed (from old_name_development
to new_name_development
). I wonder if there are other places in the automatically generated files that needs changing.
Is there any built in command for changing the application name ?
Renaming your rails 5 app is even easier! Open up the config/application. rb file within your rails project, there you see a module with the same name as your app. All you need to do is change the modules name to your preferred app name.
The configuration file config/application. rb and environment-specific configuration files (such as config/environments/production. rb ) allow you to specify the various settings that you want to pass down to all of the components. For example, you could add this setting to config/application.rb file: config.
Rails is a web application development framework written in the Ruby programming language. It is designed to make programming web applications easier by making assumptions about what every developer needs to get started. It allows you to write less code while accomplishing more than many other languages and frameworks.
In Rails 3, there are references to the application name in the following files:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With