私はブートストラップをレール上でルビーに統合しようとしていますが、成功しません。Ruby on Railsにブートストラップを統合する5.1.4
git_source(:github) do |repo_name|
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
"https://github.com/#{repo_name}.git"
end
gem 'sass-rails', '~> 5.0'
gem 'bootstrap-sass', '3.3.7'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.1.4'
# Use postgresql as the database for Active Record
gem 'pg', '~> 0.18'
# Use Puma as the app server
gem 'puma', '~> 3.7'
# Use SCSS for stylesheets
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
を、私のcustom.scssファイルに@import "bootstrap-sprockets"; @import "bootstrap";
をインポートしています
私は、次の宝石を使用しています。
ブートストラップが魔力の働きをすることを期待していましたが、何も起こっていません。 助けてくれてありがとう!
レイアウトに 'custom.css'へのリンクを追加しましたか? – max