rails 4.0.0 rails bootstrap

作者: u011345213
发布时间:2015-07-02 17:19:36


1、新建一个项目
rails new intern_sys --skip-bundle -d mysql

2、使用Twitter Bootstrap
在项目的Gemfile文件中添加以下内容

gem "therubyracer"
gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
gem "twitter-bootstrap-rails"

3、加快bundle install 速度

bundle install --local

4、安装默认的
rails generate bootstrap:install less

rails generate bootstrap:install static

rails g bootstrap:layout application fluid  or  rails g bootstrap:layout application fixed

rails g bootstrap:themed Posts




Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
添加如下到gemfile
gem 'execjs'
gem 'therubyracer'


版权声明:本文为博主原创文章,未经博主允许不得转载。

标签: Bootstrap Rails
来源:http://blog.csdn.net/u011345213/article/details/15501375

推荐: