Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change a Ruby on Rails application name?

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 ?

like image 847
Misha Moroshko Avatar asked Dec 08 '10 02:12

Misha Moroshko


People also ask

How do I rename my Rails app?

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.

What is application RB in rails?

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.

What does rails add to Ruby?

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.


1 Answers

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
like image 112
Chris Alley Avatar answered Oct 23 '22 01:10

Chris Alley