[英]How do I change a Ruby on Rails (4) application name?
Essentially I have a basic app that I would like to use as base for my other projects. 本质上,我有一个基本应用程序,希望用作其他项目的基础。
I ran git clone git@site.org:user/app.git newfolder
我跑了
git clone git@site.org:user/app.git newfolder
But when I run my rails app rails s
I get the following error: 但是,当我运行rails app
rails s
,出现以下错误:
Migrations are pending; run 'rake db:migrate RAILS_ENV=development' to resolve this issue.
So I run rake db:migrate
and start the app again, getting the following error: 因此,我运行
rake db:migrate
并再次启动应用程序,出现以下错误:
I have a sneaking suspicion that it has something to do with the app name as asked in this question but I noticed the solution was provided for Rails 3 and the GitHub project hasn't been updated in two years. 我暗中怀疑它与这个问题中的应用名称有关,但是我注意到该解决方案是为Rails 3提供的,并且GitHub项目在两年内没有更新。
Essentially, I think I have a solution (renaming the app) but I don't know how to do that. 本质上,我认为我有解决方案(为应用程序重新命名),但我不知道该怎么做。 However, I may be wrong and I don't know why I am getting this error?
但是,我可能错了,而且我不知道为什么会收到此错误?
You are getting this error because, one of the css files you are requiring in your application.css is requiring application.css. 您收到此错误的原因是,您的application.css中需要的一个CSS文件中需要application.css。 Go through all the file in your app/assets/stylesheets and make sure that none of the file that is required in application.css is requiring application.css.
浏览您的app / assets / stylesheets中的所有文件,并确保application.css中不需要的文件都不需要application.css。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.