Railsでbootstrapを使いたい
railsでbootstrapを使う練習をしていますが、サーバーを起動した時に反映されません。
ソースコード
gemfile
1gem 'haml-rails' 2gem 'font-awesome-rails' 3gem 'bootstrap', '~> 4.1.1' 4gem 'jquery-rails'
applicationJs
1// This is a manifest file that'll be compiled into application.js, which will include all the files 2// listed below. 3// 4// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, 5// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. 6// 7// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the 8// compiled file. JavaScript code in this file should be added after the last require_* statement. 9// 10// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details 11// about supported directives. 12// 13//= require jquery3 14//= require popper 15//= require bootstrap-sprockets 16//= require jquery 17//= require jquery_ujs 18//= require turbolinks 19//= require_tree .
applicationScss
1@import 'bootstrap'; 2@import 'font-awesome';
試してみたこと
Railsの各ファイルに入れても文字がなかったり、ちゃんと表示されません。
写真1番上のcssは
stylesheets
1_animate.scss
applicationScss
1@import './animate';
のように変換しています。
ご教授のほどよろしくお願いします。
補足情報(FW/ツールのバージョンなど)
Ruby 2.5.1
rails 5.0.7.2
あなたの回答
tips
プレビュー