我最近尝试按照https://github.com/twbs/bootstrap-sass#sass的步骤使用boostrap-sass - 但是当我尝试在localhost上查看我的网页时会出现错误。这是我运行rails服务器时的错误消息 注意:我添加了gem'bootstrap-sass','〜> 3.0.3.0'到gem文件,以及将@import'bootstrap'添加到我的styles.css.scss文档中
Started GET "/" for 127.0.0.1 at 2014-01-26 16:18:16 -0500
Processing by PagesController#home as HTML
Rendered pages/home.html.erb within layouts/application (7.0ms)
WARN: tilt autoloading 'sass' in a non thread-safe way; explicit require 'sass'
suggested.
Completed 500 Internal Server Error in 951ms
ActionView::Template::Error (File to import not found or unreadable: boostrap.
Load paths:
c:/RailsInstaller/DevKit/omrails/app/assets/images
c:/RailsInstaller/DevKit/omrails/app/assets/javascripts
c:/RailsInstaller/DevKit/omrails/app/assets/stylesheets
c:/RailsInstaller/DevKit/omrails/vendor/assets/javascripts
c:/RailsInstaller/DevKit/omrails/vendor/assets/stylesheets
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/turbolinks-2.2.0/lib/asse
ts/javascripts
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/jquery-rails-3.0.4/vendor
/assets/javascripts
(in c:/RailsInstaller/DevKit/omrails/app/assets/stylesheets/styles.css.scss:1)
):
2: <html>
3: <head>
4: <title>Omrails</title>
5: <%= stylesheet_link_tag "application", media: "all", "data-turbolinks
-track" => true %>
6: <%= javascript_include_tag "application", "data-turbolinks-track" => tru
e %>
7: <%= csrf_meta_tags %>
8: </head>
app/assets/stylesheets/styles.css.scss:1
app/views/layouts/application.html.erb:5:in `_app_views_layouts_application_ht
ml_erb___872362987_32078088'
Rendered C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-4.0.2
/lib/action_dispatch/middleware/templates/rescues/_trace.erb (3.0ms)
Rendered C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-4.0.2
/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (1.0
ms)
Rendered C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-4.0.2
/lib/action_dispatch/middleware/templates/rescues/template_error.erb within resc
ues/layout (33.0ms)
[2014-01-26 16:18:18] ERROR Errno::ECONNABORTED: An established connection was a
borted by the software in your host machine.
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:80:in `
eof?'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/httpserver.rb:80:in `
run'
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/webrick/server.rb:191:in `blo
ck in start_thread'
答案 0 :(得分:1)
尝试将gem 'bootstrap-sass', '~> 3.0.3.0'
添加到您的Gemfile中。