在开发中它工作得很好,但在生产(Heroku)上,它因以下错误而中断。
错误实际上在
<%= link_to clip.user.show.name, clip.user.show %>
错误日志:
ActionView::Template::Error (undefined method `name' for nil:NilClass):
2013-09-02T10:24:09.366120+00:00 app[web.1]: 34:
2013-09-02T10:24:09.366120+00:00 app[web.1]: 35: <p class="clip-uploader pull-left" data-no-turbolink>
2013-09-02T10:24:09.366120+00:00 app[web.1]: 36: <strong>
2013-09-02T10:24:09.366120+00:00 app[web.1]: 37: <%= link_to clip.user.show.name, clip.user.show %>
2013-09-02T10:24:09.366120+00:00 app[web.1]: 38: </strong>
2013-09-02T10:24:09.366120+00:00 app[web.1]: 39: </p>
2013-09-02T10:24:09.366120+00:00 app[web.1]: 40:
2013-09-02T10:24:09.366120+00:00 app[web.1]: app/views/clips/_clip.html.erb:37:in `_app_views_clips__clip_html_erb_
为什么这会在 heroku 上刹车?