您的位置:首页 > Web前端 > BootStrap

rails 4.0.0 rails bootstrap

2013-11-12 13:54 323 查看
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'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: