我在Heroku上有一个应用程序。在某些时候,我不小心将文件夹命名为“Admin”而不是“admin”。现在它停留在大写的名称而不是小写。我该如何解决这个问题?
这是heroku日志中的错误
2013-06-10T15:18:48.223475+00:00 app[web.1]: Started GET "/admin/orders/new" for 173.78.15.104 at 2013-06-10 15:18:48 +0000
2013-06-10T15:18:48.296834+00:00 app[web.1]:
2013-06-10T15:18:48.296834+00:00 app[web.1]: ActionView::Template::Error (Missing partial admin/orders/form, active_admin/resource/form, active_admin/base/form, inherited_resources/base/form, application/form with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :arb, :haml]}. Searched in:
2013-06-10T15:18:48.296834+00:00 app[web.1]: * "/app/app/views"
2013-06-10T15:18:48.296834+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/bundler/gems/active_admin-fa7e4de2d5fa/app/views"
2013-06-10T15:18:48.296834+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/kaminari-0.14.1/app/views"
2013-06-10T15:18:48.296834+00:00 app[web.1]: * "/app/vendor/bundle/ruby/1.9.1/gems/devise-2.2.4/app/views"
2013-06-10T15:18:48.296834+00:00 app[web.1]: ):
答案 0 :(得分:5)
您应该使git push
提交正确的文件夹名称。
假设您的文件夹位于app / views中:
mv app/views/Admin app/views/admin/
git add app/views/admin
git commit -am "rename admin directory"
git push heroku master
答案 1 :(得分:0)
最终,你的目录在git中不正确地大写,heroku读取git。你需要在git中进行目录更改,然后按下。但是,默认情况下,git不区分大小写。这就是你如何解决这个问题。
git mv app/views/Admin app/views/admins
git mv app/views/admins app/views/admin
git commit -m 'changed case of admin folder for heroku'
git push heroku master