我开始使用引导程序版本 4。并开始收到部署到 Heroku 的此错误。我的样式表是 custom.css.scss。应用程序在开发中工作没有问题。已发布未开始升级到 bootstrap v4。当我使用 bootstrap v3 时,我从来没有遇到过部署问题。我花了很多时间查看其他帖子的不同建议,但无济于事。
bootstrap.custom.css.scss 文件
@import "bootstrap";
应用程序.scss
/*
*= require_tree .
*= require_self
*/
应用程序.js
= require jquery
= require tether
= require bootstrap-sprockets
= require jquery_ujs
= require turbolinks
= require_tree .
heroku 部署出错
rake aborted!
Sass::SyntaxError:File to import not found or unreadable:bootstrap-sprockets.
remote: Load paths:
remote: /tmp/build_9899a15a0b71b25c23a9b8dfc6d02e80/app/assets/images
remote:/tmp/build_9899a15a0b71b25c23a9b8dfc6d02e80/app/assets/javascripts
remote:/tmp/build_9899a15a0b71b25c23a9b8dfc6d02e80/app/assets/stylesheets
remote:/tmp/build_9899a15a0b71b25c23a9b8dfc6d02e80/vendor/assets/javascripts
remote:/tmp/build_9899a15a0b71b25c23a9b8dfc6d02e80/vendor/assets/stylesheets
宝石文件
gem 'rails', '4.2.0'
gem 'pg'
gem 'sass-rails', '>= 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
已安装的宝石
gem 'bootstrap', '~> 4.0.0.alpha3'
gem 'sass', '~> 3.4', '>= 3.4.21'
gem 'sprockets-rails', '~> 3.0'
source 'https://rails-assets.org' do
gem 'rails-assets-tether', '>= 1.1.0'
end
gem 'rails_12factor', group: :production
gem 'font-awesome-rails', '~> 4.4.0.0'
gem 'pry-rails', :group => :development
gem 'autoprefixer-rails', '~> 6.0.3'
gem 'devise', '~> 3.5.2'
gem 'friendly_id', '~> 5.1.0'
gem 'simple_form'