加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-17 04:22:24 所属栏目:百科 来源:网络整理
导读:我正在构建一个简单的rails应用程序,当我加载主页时,我得到: Completed 500 Internal Server Error in 59ms ActionView::Template::Error (different prefix: "c:/" and "D:/workspaceRor/jrpappthree/ ssets/stylesheets" (in D:/workspaceRor/jrpappthree
我正在构建一个简单的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盘,然后开始工作.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读