我刚刚向Heroku部署了一个应用,其网址为:http://msitproject.heroku.com
当我上传应用程序时,它工作正常但后来又添加了另一个名为developer
的视图。
此链接在我的localhost中完美运行,但当我点击Heroku上导航栏中的Developer链接时,我被重定向到错误500页面。我无法弄清楚为什么会这样。
我使用了代码
git push heroku master
接下来是:
heroku run rake db:migrate
我的github回购链接是:https://github.com/rohitbegani/msitproject
这是我的heroku日志:
2014-02-05T18:26:29.028106+00:00 heroku[router]: at=info method=GET path=/user_friendships.json host=msitproject.herokuapp.com request_id=5e6692bd-8d4d-40dc-863b-2ec608bebe70 fwd="122.161.19.141" dyno=web.1 connect=2ms service=21ms status=401 bytes=61
2014-02-05T18:26:31.981378+00:00 app[web.1]: Started GET "/developer" for 122.161.19.141 at 2014-02-05 18:26:31 +0000
2014-02-05T18:26:31.985163+00:00 app[web.1]: Processing by DeveloperController#show as HTML
2014-02-05T18:26:32.022137+00:00 app[web.1]: Rendered developer/show.html.erb within layouts/application (34.6ms)
2014-02-05T18:26:32.022137+00:00 app[web.1]: Completed 500 Internal Server Error in 37ms
2014-02-05T18:26:32.024083+00:00 app[web.1]:
2014-02-05T18:26:32.024083+00:00 app[web.1]: ActionView::Template::Error (rohitbegani.jpg isn't precompiled):
2014-02-05T18:26:32.024083+00:00 app[web.1]: 1: <div class="dev-image offset5"><%= image_tag 'rohitbegani.jpg' %></div>
2014-02-05T18:26:32.024083+00:00 app[web.1]: 2: <h1 class="dev-text">Rohit Begani</h1>
2014-02-05T18:26:32.024083+00:00 app[web.1]: app/views/developer/show.html.erb:1:in ``_app_views_developer_show_html_erb__2217822362271118091_28442460'
2014-02-05T18:26:32.024083+00:00 app[web.1]: 3: <h3 class="dev-text">Developer, Designer and an avid football fan</h3>
2014-02-05T18:26:32.024083+00:00 app[web.1]:
2014-02-05T18:26:32.024083+00:00 app[web.1]: 4: <p class="dev-text">Hi I am a developer and a designer from New Delhi, India. Some of the languages I code in are Ruby, RoR, HTML, CSS(3).<br> I am a strong believer of open source and most of my projects are available publicly.<br>Other than coding I love to watch football and root for the gunners. Oh yeah I love bikes.<br> I am the co-founder of ObtuseOrange, a design comapny based in New Delhi, India</p>
2014-02-05T18:26:32.024083+00:00 app[web.1]:
2014-02-05T18:26:32.028671+00:00 heroku[router]: at=info method=GET path=/developer host=msitproject.herokuapp.com request_id=fc9de369-7b14-49bf-ae60-3cec6082e2a8 fwd="122.161.19.141" dyno=web.1 connect=4ms service=48ms status=500 bytes=64
答案 0 :(得分:1)
尝试在本地预编译您的资源,然后在heroku上再次推送它
$ RAILS_ENV=production bundle exec rake assets:precompile
编译后不要忘记做
$git add public/assets
$git commit -m "vendor compiled assets"
在你的主分支中,这样你就会用编译的资源推动你的最新主人,