我刚刚将我的Rails应用程序更新为5.0.0.rc1,现在无法加载我的资产。最初的错误声称我需要assets / config中的manifest.rb文件。我没有这个文件夹所以我和manifest.rb文件一起创建了它。这是我的manifest.rb文件:
//= link ../javascripts/application.js
//= link_directory ../javascripts .js
//= link_directory ../stylesheets .css
//= link_directory ../stylesheets .sass
//= link_tree ../javascripts .js
//= link_tree ../images
现在我得到了这个:
ActionView :: Template :: Error(在'/ Users / Clover / Desktop / Code / myroomies / app / assets / config'下找不到文件'../javascripts/application.js'): 4:RoomiesApp 5:<%= csrf_meta_tags%> 6:<%= stylesheet_link_tag'application.css.sass',media:'all','data-turbolinks-track'=> '重载'%> 7:<%= javascript_include_tag'application','data-turbolinks-track'=> '重载'%> 8:
9: 10:
应用程序/资产/配置/ manifest.js:1 app / views / layouts / application.html.erb:7:在`_app_views_layouts_application_html_erb___1555946743671048113_70305755306180' 渲染/Users/Clover/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb在救援/布局内 渲染/Users/Clover/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/_source.html.erb 呈现/Users/Clover/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/_source.html.erb (3.8ms) 渲染/Users/Clover/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb 呈现/Users/Clover/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.6毫秒) 渲染/Users/Clover/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb 呈现/Users/Clover/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (0.6ms) 呈现/Users/Clover/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/actionpack-5.0.0.rc1/lib/action_dispatch/middleware/templates/rescues/template_error.html.erb在救援/布局(60.2ms)内
据我所知,我的application.js文件绝对是在那条路上。
我的应用程序目前正在Heroku中运行,没有任何问题。所以我直接从Heroku克隆了回购。它没有assets / config文件夹,但似乎仍然正常工作。我知道生产和开发环境之间存在差异,但我还不清楚如何在两者之间正确切换。我在这里缺少什么?