ruby-on-rails – win7上的@import’bootstrap’错误,显示500错误

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – win7上的@import’bootstrap’错误,显示500错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在构建一个简单的rails应用程序,当我加载主页时,我得到:
    Completed 500 Internal Server Error in 59ms
    ActionView::Template::Error (different prefix: "c:/" and
    "D:/workspaceRor/jrpappthree/ ssets/stylesheets" 
    (in D:/workspaceRor/jrpappthree/app/assets/stylesheets/custom.css.scss)):
2: <html>
3:   <head>
4:     <title><%= full_title(yield(:title)) %></title>
5:     <%= stylesheet_link_tag    "application",media: "all" %>
6:     <%= javascript_include_tag "application" %>
7:     <%= csrf_Meta_tags %>
8:     <%= render 'layouts/shim' %>

我的宝石文件

gem 'rails'
gem 'bootstrap-sass'
gem 'bcrypt-ruby'
gem 'faker'
gem 'will_paginate'
gem 'bootstrap-will_paginate'
gem 'pg'
group :development,:test do
gem 'MysqL2'
gem 'annotate'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do

gem 'sass-rails'
gem 'coffee-rails'
gem 'uglifier'
gem 'railties'
end
gem 'jquery-rails'
group :test do

end

group :production do
#  gem 'pg'
end

在D:/workspaceRor/jrpappthree/app/assets/stylesheets/custom.css.scss

@import "bootstrap";


body {
   padding-top: 60px;
}
.
.
.

在开发环境中,它显示上述错误,但在生产中它工作正常.
我甚至试过了

# config/environments/production.rb
...
config.assets.compile = true
...

但它没有解决我的问题.
那么在开发环境中运行应用程序的解决方案是什么?成功?

解决方法

看起来它是windows上bootstrap.sass gem中的一个bug.

我看到人们将项目移动到C盘,然后开始工作.

原文链接:https://www.f2er.com/ruby/268648.html

猜你在找的Ruby相关文章