无法导入引导程序

时间:2016-11-13 06:39:14

标签: css ruby-on-rails ruby bootstrap-sass

我已经查看了很多解决方案,但仍无法找到问题的解决方案。我正在使用在Windows操作系统上运行的Rails 5.0.0.1。我已完成捆绑安装并重新启动服务器,以及降级sass-rails但我似乎无法解决问题。

我需要的宝石:     bootstrap-sass< 3.3.7>     sass-rails< 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

请帮忙!谢谢!

EDIT 这是我的宝石列表: (它没有使用两个版本,但我想我可能搞砸了一些如何降级sass-rails然后安装autoprefixer-rails gem以获得我发现的不同解决方案。)

*本地宝石*

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)

1 个答案:

答案 0 :(得分:2)

添加@import" bootstrap-sprockets&#34 ;; @import" bootstrap&#34 ;;在您的application.scss文件中,删除所有* = require_self和* = require_tree。来自sass文件的声明。