嘗試安裝引導寶石後,我收到以下錯誤。我遵循了在其他地方找到的建議,但似乎並沒有奏效。我確實總是記得在安裝捆綁軟件後重新啓動我的服務器,但我仍然遇到麻煩。要導入未發現引導寶石上的錯誤
文件或不可讀:
顯示/home/ubuntu/workspace/sample_app/app/views/static_pages/home.html.erb其中線#13提出引導鏈輪。
的Gemfile:
source 'https://rubygems.org'
gem 'rails', '5.0.0'
gem 'bootstrap-sass', '3.3.6'
gem 'puma', '3.4.0'
gem 'uglifier', '3.0.0'
gem 'coffee-rails', '4.2.1'
gem 'jquery-rails', '4.1.1'
gem 'turbolinks', '5.0.0'
gem 'jbuilder', '2.4.1'
group :development, :test do
gem 'sqlite3', '1.3.11'
gem 'byebug', '9.0.0', platform: :mri
end
group :development do
gem 'web-console', '3.1.1'
gem 'listen', '3.0.8'
gem 'spring', '1.7.2'
gem 'spring-watcher-listen', '2.0.0'
end
group :test do
gem 'rails-controller-testing', '0.1.1'
gem 'minitest-reporters', '1.1.9'
gem 'guard', '2.13.0'
gem 'guard-minitest', '2.4.4'
end
group :production do
gem 'pg', '0.18.4'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
aplication.css.scss
*...
* It is generally better to create a new file per style scope.
*
*/
@import "bootstrap-sprockets";
@import "bootstrap";
的application.js
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require_tree .
感謝您的幫助!
您需要添加'// =在需要引導,sprockets'你的'application.js'看docs here:https://github.com/twbs/bootstrap-sass – mrvncaragay
我試過這種方法並重新啓動服務器。現在我得到這個錯誤:無法找到類型爲'application/javascript'的文件'bootstrap-sprockets' –