2016-11-13 91 views
1

我已經瀏覽了很多解決方案,但仍無法找到解決問題的方案。我使用Rails 5.0.0.1,在Windows操作系統上運行。我已經完成了捆綁安裝並重新啓動了服務器,並且降級了sass-rails,但似乎無法解決問題。無法導入引導程序

,我需要這樣做的寶石: 引導,薩斯< 3.3.7> 青菜護欄< 5.0.6,3.2.0>

在我application.scss文件:

@import "bootstrap-sprockets"; 
@import "bootstrap"; 

在我的application.js文件:

//= require jquery 
//= require jquery_ujs 
//= require turbolinks 
//= bootstrap-sprockets 
//= require_tree . 

The error page

請幫忙!謝謝!

編輯 這裏是我的寶石列表: (它沒有使用有兩個版本,但我想我可能會搞砸了一些如何當我降級青菜護欄,然後安裝autoprefixer護欄寶石的不同的解決方案,我發現)

* LOCAL GEMS *

actioncable (5.0.0.1) actionmailer (5.0.0.1, 4.2.6) actionpack (5.0.0.1, 4.2.6, 3.2. actionview (5.0.0.1, 4.2.6) activejob (5.0.0.1, 4.2.6) activemodel (5.0.0.1, 4.2.6, 3.2 activerecord (5.0.0.1, 4.2.6) activesupport (5.0.0.1, 4.2.6, 3 arel (7.1.2, 7.1.1, 6.0.3) autoprefixer-rails (6.5.3) bigdecimal (default: 1.2.6) binding_of_caller (0.7.2) bootstrap-sass (3.3.7) builder (3.2.2, 3.0.4) bundler (1.13.6, 1.12.5) byebug (9.0.5) coffee-rails (4.2.1, 4.1.1) coffee-script (2.4.1) coffee-script-source (1.10.0) concurrent-ruby (1.0.2) debug_inspector (0.0.2) erubis (2.7.0) execjs (2.7.0) gem-path (0.6.1) globalid (0.3.7) hike (1.2.3) i18n (0.7.0) io-console (default: 0.4.3) jbuilder (2.6.0) journey (1.0.4) jquery-rails (4.2.1) json (1.8.3, default: 1.8.1) loofah (2.0.3) mail (2.6.4) method_source (0.8.2) mime-types (3.1) mime-types-data (3.2016.0521) mini_portile2 (2.1.0) minitest (5.9.0, 5.4.3) multi_json (1.12.1) nio4r (1.2.1) nokogiri (1.6.8 x64-mingw32) pkg-config (1.1.7) power_assert (0.2.2) psych (default: 2.0.8) puma (3.6.0) rack (2.0.1, 1.6.4, 1.4.7) rack-cache (1.6.1) rack-ssl (1.3.4) rack-test (0.6.3) rails (5.0.0.1, 4.2.6) rails-deprecated_sanitizer (1.0. rails-dom-testing (2.0.1, 1.0.7) rails-html-sanitizer (1.0.3) railties (5.0.0.1, 4.2.6, 3.2.22 rake (11.2.2, default: 10.4.2) rdoc (4.2.2, default: 4.2.0, 3.1 rubygems-update (2.6.8) sass (3.4.22, 3.1.21) sass-rails (5.0.6, 3.2.0) sdoc (0.4.1) spring (1.7.2) sprockets (3.7.0, 2.2.3) sprockets-rails (3.2.0) sqlite3 (1.3.11 x64-mingw32) test-unit (3.0.8) thor (0.19.1) thread_safe (0.3.5) tilt (2.0.5, 1.4.1) turbolinks (5.0.1) turbolinks-source (5.0.0) tzinfo (1.2.2) tzinfo-data (1.2016.6) uglifier (3.0.2) web-console (3.3.1, 2.3.0) websocket-driver (0.6.4) websocket-extensions (0.1.2)

+0

你可以添加你的Gemfile到你的問題了。同樣,'gem list'只是一個理智的檢查,它確實存在'bootstrap-sass'。 – David

回答

2

加入@import 「自舉鏈輪」 之後。 @import「bootstrap」;在你的application.scss文件中,刪除所有* = require_self和* = require_tree。來自sass文件的聲明。

+0

我已經刪除它,但它仍然不起作用 – xiaolongbao

+0

這個過程適用於我在我的mac環境中。 – tanvir002700