0

走っrails serverて行きましたhttp://localhost:3000

<%= stylesheet_link_tag "application", :media => "all" %> があります

layout.html.erb で

これがapplication.cssです

 /*
  * This is a manifest file that'll be compiled into  application.css, which will include all the files  
* listed below.   *   * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,  
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.   *   * You're  free to add application-wide styles to this file and they'll appear at the top of the   * compiled file, but it's generally better to create a new file per style scope.  *   
*= require_self   
*= require_tree .  
*/

次のようにコンパイルすることはサポートされていません

    <link href="/assets/twitter-bootstrap-static/bootstrap.css?body=1" media="all" rel="stylesheet" type="text/css" /> 
 <link href="/assets/twitter-bootstrap-static/fontawesome.css?body=1" media="all" rel="stylesheet" type="text/css" />  
<link href="/assets/bootstrap_and_overrides.css?body=1" media="all" rel="stylesheet" type="text/css" />

何か不足していますか?私は持っているレール3.2.8を使用しています

# Enable the asset pipeline
config.assets.enabled = true

application.rbで

アップデート

走った後 RAILS_ENV=development bundle exec rake assets:precompile

コンパイルされたアセットを見ることができます

4

1 に答える 1

1

通常、アセットは開発モードではコンパイルされません: http://guides.rubyonrails.org/asset_pipeline.html#in-development

このリファレンスには、必要に応じてアセットのプリコンパイルに関する情報も含まれています。

于 2013-09-07T05:20:15.797 に答える