如何使用Ruby Rails设置Twitter Bootstrap

时间:2015-08-15 15:59:44

标签: ruby-on-rails ruby twitter-bootstrap rbenv

您好我在Mac OSX上使用Homebrew和Rbenv设置了Ruby Rails。

我现在想要将Bootstrap整合到该设置中,但我不确定如何相应地设置Bootstrap。

有没有人有任何建议/设置指南?

2 个答案:

答案 0 :(得分:1)

你的Gemfile中的

gem 'bootstrap-sass' 然后bin / rake bundle install

答案 1 :(得分:0)

步骤1:

您需要在Gemfile中包含Bootstrap gem,只需添加以下代码行即可:

gem' bootstrap-sass'

有关bootstrap gem的更多详细信息,请访问以下链接: https://rubygems.org/gems/bootstrap-sass

步骤2:

将gem添加到Gemfile后,只需运行以下命令:

捆绑安装

步骤-3:

现在,您已准备好将bootstrap peoperties导入样式表。只需将以下两个@imports添加到您的css / scss:

@import" bootstrap-sprockets&#34 ;; @import" bootstrap&#34 ;;

希望它适合你!