Ruby——在Rails上使用Bootstrap

首先   Download Bootstrap

下载的文件解压缩之后就可以看到如下的文件结构:

  bootstrap/
  ├── css/
     ├── bootstrap.css
     ├── bootstrap.min.css
  ├── js/
     ├── bootstrap.js
     ├── bootstrap.min.js
  └── img/
      ├── glyphicons-halflings.png
      └── glyphicons-halflings-white.png

  • Copy:

    bootstrap/dist/css/bootstrap.css and bootstrap/dist/css/bootstrap.min.css

    To: vendor/assets/stylesheets

  • Copy:

    bootstrap/dist/js/bootstrap.js and bootstrap/dist/js/bootstrap.min.js

    To: vendor/assets/javascripts

  • Update: app/assets/stylesheets/application.css by adding:

    *= require bootstrap.min
  • Update: app/assets/javascripts/application.jsby adding:

    //= require bootstrap.min
    



你可能感兴趣的:(Ruby之道)