通过twitter-bootstrap-rails gem升级到bootstrap 2.0.1后,Heroku部署失败 [英] Heroku deploy fails after upgrading to bootstrap 2.0.1 via twitter-bootstrap-rails gem

查看:118
本文介绍了通过twitter-bootstrap-rails gem升级到bootstrap 2.0.1后,Heroku部署失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:

这个错误在 git push heroku master 中显示:

  ----->为Rails资产管道准备应用程序
运行:rake资产:预编译
rake中止!
无法找到文件'twitter / bootstrap'
(在/tmp/build_2pmsvze33th3e/app/assets/javascripts/application.js:9)

任务:TOP => ; assets:precompile:primary
(请参阅通过使用--trace运行任务完整跟踪)
预编译资产失败,启用运行时资产编译
注入rails31_enable_runtime_asset_compilation
请参阅本文以获取疑难解答帮助:
http://devcenter.heroku.com/articles/rails31_heroku_cedar#troubleshooting

I按照此指南将Bootstrap 2布局升级到2.0.1。之后,我收到了Heroku发布的错误消息:

  2012-02-23T23:12:09 + 00:00 app [web .1]:ActionView :: Template :: Error('twitter / bootstrap.less'was not found。
2012-02-23T23:12:09 + 00:00 app [web.1]:
2012-02-23T23:12:09 + 00:00 app [web.1] :(在/app/app/assets/stylesheets/bootstrap.css.less)):
2012-02-23T23 :12:09 + 00:00 app [web.1]:7:/%title gitwatcher.com
2012-02-23T23:12:09 + 00:00 app [web.1]:8:= csrf_meta_tags
2012-02-23T23:12:09 + 00:00 app [web.1]:9:= stylesheet_link_tagvendor,:media => screen
2012-02-23T23:12:09 + 00:00 app [web.1]:10:= stylesheet_link_tagapplication,:rel => stylesheet
2012-02-23T23:12:09 + 00:00 app [web.1]:11:= stylesheet_link_taghttp://jqueryui.com/repository/tags/latest/themes/base/ jquery.ui.all.css,:media => screen,projection
2012-02-23T23:12:09 + 00:00 app [web.1]:12:/
2012-02-23T23:12:09 + 00:00 app [web.1]:13::css
2012-02-23T23:12:09 + 00:00 app [web.1]:app / views / layouts / application.html.haml:10: _app_views_layouts_application_html_haml___2608554683581233975_52490540'
2012-02-23T23:12:09 + 00:00 app [web.1]:
2012-02-23T23:12:09 + 00:00 app [web.1]:
2012-02-23T23:12:09 + 00:00 app [web.1]:cache:[GET /] miss
2012-02-23T23:12:09 + 00:00 app [ web.1]:通过HomeController#index处理为HTML
2012-02-23T23:12:09 + 00:00 app [web.1]:渲染共享/ _watch-list-tab.html.haml(4.5 ms)
2012-02-23T23:12:09 + 00:00 app [web.1]:渲染共享/ _watch-list-table.html.haml(30.2ms)
2012-02- 23T23:12:09 + 00:00 app [web.1]:在布局/应用程序中呈现home / index.html.haml(101.7ms)
2012-02-23T23:12:09 + 00:00 app [web.1]:编译vendor.css(3ms)(pid 1)
2012-02-23T23:12:09 + 00:00 app [web.1]:编译css3-github-buttons / gh- BU ttons.css(0ms)(pid 1)
2012-02-23T23:12:09 + 00:00 app [web.1]:编译jquery_carousel / carousel.css(0ms)(pid 1)
2012-02-23T23:12:09 + 00:00 app [web.1]:编译的application.css(2ms)(pid 1)
2012-02-23T23:12:09 + 00:00 app [web.1]:在858ms内完成500次内部服务器错误

以前我得到一个现有的Rails 3.1。 3应用程序已经在Heroku Cedar上使用Bootstrap 2布局。



任何想法?

解决方案

删除以下文件应用/资产/stylesheets/bootstrap.css.less并享受。
Soruce https://github.com/seyhunak/twitter-bootstrap- rails / issues / 123

UPDATE:

this error is shown during git push heroku master :

-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       rake aborted!
       couldn't find file 'twitter/bootstrap'
       (in /tmp/build_2pmsvze33th3e/app/assets/javascripts/application.js:9)

       Tasks: TOP => assets:precompile:primary
       (See full trace by running task with --trace)
       Precompiling assets failed, enabling runtime asset compilation
       Injecting rails31_enable_runtime_asset_compilation
       Please see this article for troubleshooting help:
       http://devcenter.heroku.com/articles/rails31_heroku_cedar#troubleshooting

I upgraded Bootstrap 2 layout to 2.0.1 by following this guide. After that I get this error deploing to Heroku :

2012-02-23T23:12:09+00:00 app[web.1]: ActionView::Template::Error ('twitter/bootstrap.less' wasn't found.
2012-02-23T23:12:09+00:00 app[web.1]: 
2012-02-23T23:12:09+00:00 app[web.1]:   (in /app/app/assets/stylesheets/bootstrap.css.less)):
2012-02-23T23:12:09+00:00 app[web.1]:     7:     /%title gitwatcher.com
2012-02-23T23:12:09+00:00 app[web.1]:     8:     = csrf_meta_tags
2012-02-23T23:12:09+00:00 app[web.1]:     9:     = stylesheet_link_tag "vendor",       :media => "screen"
2012-02-23T23:12:09+00:00 app[web.1]:     10:     = stylesheet_link_tag "application",  :rel => "stylesheet"
2012-02-23T23:12:09+00:00 app[web.1]:     11:     = stylesheet_link_tag "http://jqueryui.com/repository/tags/latest/themes/base/jquery.ui.all.css", :media => "screen, projection"
2012-02-23T23:12:09+00:00 app[web.1]:     12:     / 
2012-02-23T23:12:09+00:00 app[web.1]:     13:     :css
2012-02-23T23:12:09+00:00 app[web.1]:   app/views/layouts/application.html.haml:10:in `_app_views_layouts_application_html_haml___2608554683581233975_52490540'
2012-02-23T23:12:09+00:00 app[web.1]: 
2012-02-23T23:12:09+00:00 app[web.1]: 
2012-02-23T23:12:09+00:00 app[web.1]: cache: [GET /] miss
2012-02-23T23:12:09+00:00 app[web.1]:   Processing by HomeController#index as HTML
2012-02-23T23:12:09+00:00 app[web.1]: Rendered shared/_watch-list-tab.html.haml (4.5ms)
2012-02-23T23:12:09+00:00 app[web.1]: Rendered shared/_watch-list-table.html.haml (30.2ms)
2012-02-23T23:12:09+00:00 app[web.1]: Rendered home/index.html.haml within layouts/application (101.7ms)
2012-02-23T23:12:09+00:00 app[web.1]: Compiled vendor.css  (3ms)  (pid 1)
2012-02-23T23:12:09+00:00 app[web.1]: Compiled css3-github-buttons/gh-buttons.css  (0ms)  (pid 1)
2012-02-23T23:12:09+00:00 app[web.1]: Compiled jquery_carousel/carousel.css  (0ms)  (pid 1)
2012-02-23T23:12:09+00:00 app[web.1]: Compiled application.css  (2ms)  (pid 1)
2012-02-23T23:12:09+00:00 app[web.1]: Completed 500 Internal Server Error in 858ms

Previously I got an existing Rails 3.1.3 app already working with Bootstrap 2 layout on Heroku Cedar.

Any idea ?

解决方案

Remove the following file app/assets/stylesheets/bootstrap.css.less and enjoy. Soruce https://github.com/seyhunak/twitter-bootstrap-rails/issues/123

这篇关于通过twitter-bootstrap-rails gem升级到bootstrap 2.0.1后,Heroku部署失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆