问题描述
我有一个使用以下方法创建的 Ruby on Rails 应用程序:
I have a Ruby on Rails application that was created using:
rails new old_name -d mysql
现在我想将应用程序名称更改为 new_name
.
Now I want to change the application name to be new_name
.
仅更改应用程序文件夹名称是不够的,因为例如数据库名称也必须更改(从old_name_development
到new_name_development
).不知道自动生成的文件有没有其他地方需要修改.
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 ?
推荐答案
有一个 Rails 插件可以为您完成.超级方便.
There's a Rails plugin to do it for you. Super convenient.
这篇关于如何更改 Ruby on Rails 应用程序名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!