css – 在rails中使用Bootstrap Sass时出错

前端之家收集整理的这篇文章主要介绍了css – 在rails中使用Bootstrap Sass时出错前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用rails应用程序上的简单 ruby,我收到以下错误

TypeError:无法读取未定义的属性“进程”(在/ home / saasbook / Documents / projects / Bookkeeper / app / assets / stylesheets / application.css.sass中)

提取的来源如下:

<html>
<head>
<title>Bookkeeper</title>
<%= stylesheet_link_tag    'application',media: 'all','data-turbolinks-track' => true %> //Highlighted error line in extract
<%= javascript_include_tag 'application','data-turbolinks-track' => true %>
<%= csrf_Meta_tags %>

使用Bootstrap Sass插件添加Bootstrap Sass并遵循此tutorial后发生此错误

在摘录下面,它表明错误在:

应用程序/视图/布局/ application.html.erb:5:in_app_views_layouts_application_html_erb__226809778_88444660′

我的代码

application.html.erb

<!DOCTYPE html>
<html>
 <head>
 <title>Bookkeeper</title>
    <%= stylesheet_link_tag    'application','data-turbolinks-track' => true %>  //Highlighted error line in extract
    <%= javascript_include_tag 'application','data-turbolinks-track' => true %>
    <%= csrf_Meta_tags %>

 </head>
 <body>
    <%= yield %>
 </body>        
</html>

application.css.sass

/*
* This is a manifest file that'll be compiled into application.css,which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory,lib/assets/stylesheets,vendor/assets/stylesheets,* or vendor/assets/stylesheets of plugins,if any,can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require_tree 
*= require_self
*/

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

页面在红色边框顶部显示标题,这有什么帮助吗?

Portal#index中的ExecJS :: ProgramError

解决方法

autoprefixer-rails gem的5.0版本似乎存在问题.尝试降级到4.0.2.2.

https://github.com/ai/autoprefixer-rails/issues/47

如果您使用Node而不是RubyRacer作为JS运行时,则会弹出.

编辑 –
这已在最新版本的autoprefixer中修复.

bundle update autoprefixer-rails
原文链接:https://www.f2er.com/css/242323.html

猜你在找的CSS相关文章