$ cp -r <BootStrap>/fonts <Ruby On Rails Project>/vendor/assets $ cp <Bootstrap>/css/* <Ruby On Rails Project>/vendor/assets/stylesheets/ $ cp <Bootstrap>/js/* <Ruby On Rails Project>/vendor/assets/javascripts/
*= require bootstrap
//= require bootstrap
config.assets.paths << "#{Rails}/vender/assets/fonts"
$ rake assets:precompile Rails_ENV=development
$ cd <Ruby On Rails Project> $ rails g controller <Controller name> <view name>
$ vi app/views/layouts/application.html.erb
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
$ vi app/view/layout/application.html.erb
You can see sample from here.
$ vi app/assets/stylesheets/application.css
div.content { padding: 70px 20px 20px 80px; }
You can see sample from here.
$ vi app/asset/bootstrap_override.css.less
@font-face { font-family: 'Glyphicons Halflings'; src: url('/assets/glyphicons-halflings-regular.eot'); src: url('/asstes/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('/assets/glyphicons-halflings-regular.woff') format('woff'), url('/assets/glyphicons-halflings-regular.ttf') format('truetype'), url('/assets/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg'); }
$ rake assets:precompile Rails_ENV=development
In case you want to deploy to Heroku Server, you need to change config.assets.compile from false into true.
$ vi config/environments/production.rb
config.assets.compile = true
S.Yatsuzuka