在生产中找不到文件'twitter / bootstrap' [英] Couldn't find file 'twitter/bootstrap' in Production

查看:101
本文介绍了在生产中找不到文件'twitter / bootstrap'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Twitter的Bootstrap翻译成SCSS文件。它用于本地开发,但是当我预编译并推送到Heroku(使用Cedar堆栈)时,我得到了这样的结果:

I'm using Twitter's Bootstrap translated to SCSS files. It works in local-development, but when I precompile and push to Heroku (using Cedar stack), I get this:

> Started GET "/" for 74.57.16.130 at 2012-01-28 17:16:36 +0000 
> Processing by StaticPagesController#home as HTML  Rendered
> static_pages/home.html.erb within layouts/application (0.7ms) 
> Completed 500 Internal Server Error in 4ms
> 
>  ActionView::Template::Error (couldn't find file 'twitter/bootstrap'  
> (in /app/app/assets/stylesheets/application.scss.css:11)):
>      8: </head>
>      6:   <%= javascript_include_tag "application" %>
>      4:   <title><%= full_title(yield(:title)) %></title>
>      2: <html>
>      5:   <%= stylesheet_link_tag    "application", :media => "all" %>        
app/views/layouts/application.html.erb:5:in
> `_app_views_layouts_application_html_erb___288948710373692320_32137840'
>      3: <head>    cache: [GET /] miss
> 
>      7:   <%= csrf_meta_tags %>  cache: [GET /favicon.ico] miss

我使用的是Rails 3.2.0,正在Heroku上工作,直到我添加了SASS文件。

I'm using Rails 3.2.0, the app was working on Heroku until I added the SASS files.

推荐答案

您是否在使用宝石?确保您的宝石不属于资产组,并且可以在生产中使用。

Are you using a gem? Make sure your gem is not part of the assets group and is accessible in production.

# Gems used only for assets and not in production environments by default.

所以,只要将宝石移到任何组别外面,就可以了。

So just move the gem outside of any group and you should be okay.

这篇关于在生产中找不到文件'twitter / bootstrap'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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