我对安装 spree_bootstrap_theme 的指南(https://github.com/Andrewmp1/spree_bootstrap_theme)的理解有些晦涩。你对我有什么建议吗?非常感谢!
以下是我所做的:
为狂欢创建一个新的沙箱。
添加到 Gemfile:
gem 'spree_bootstrap_theme', :git => 'git://github.com/Andrewmp1/spree_bootstrap_theme.git'
将样式表中的 application.css 重命名为 application.css.scss
在 stylesheets 文件夹中创建一个新文件:bootstrap_and_overrides.css.scss。
将以下行添加到 bootstrap_and_overrides.css.scss:
@import 'store/spree_bootstrap_theme';
打开application.js,添加:
//= require bootstrap
运行 rails 服务器
我收到的结果:http: //imageshack.us/f/405/spreet.png/ 如您所见,布局已损坏。我查看了文件的源代码,没有看到任何关于引导程序的信息。我得到的是这里:
<meta content="Spree demo site" name="description" />
<link href="/assets/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
<link href="/assets/normalize.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/skeleton.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/store/screen.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/store/spree_core.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/store/spree_promo.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<link href="/assets/store/all.css?body=1" media="screen" rel="stylesheet" type="text/css" />
<meta content="authenticity_token" name="csrf-param" />
<meta content="BoSR3FtvQBjqF68s7amtXGMVypmaW68e7tHhRzYvqzw=" name="csrf-token" />
<script src="/assets/jquery.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery_ujs.js?body=1" type="text/javascript"></script>
<script src="/assets/jquery.validate/jquery.validate.min.js?body=1" type="text/javascript"> </script>
<script src="/assets/store/checkout.js?body=1" type="text/javascript"></script>
<script src="/assets/store/product.js?body=1" type="text/javascript"></script>
<script src="/assets/store/cart.js?body=1" type="text/javascript"></script>
<script src="/assets/store/spree_core.js?body=1" type="text/javascript"></script>
<script src="/assets/store/spree_promo.js?body=1" type="text/javascript"></script>
<script src="/assets/store/all.js?body=1" type="text/javascript"></script>
我也尝试将 gem 'bootstrap-sass' 添加到 Gemfile,但两种情况下的结果都与上述相同。