如何更改 Ruby on Rails 应用程序名称? [英] How to change a Ruby on Rails application name?

查看:44
本文介绍了如何更改 Ruby on Rails 应用程序名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用以下方法创建的 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_developmentnew_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.

https://github.com/get/rename

这篇关于如何更改 Ruby on Rails 应用程序名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆