rails 4.0.0 rails bootstrap

来源:互联网 发布:java web开发书籍推荐 编辑:程序博客网 时间:2024/05/17 21:59

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'


原创粉丝点击