作者:淡而有味调_740 | 来源:互联网 | 2023-05-26 18:57
我正在使用rails应用程序上的简单ruby,我收到以下错误:
TypeError: Cannot read property 'process' of undefined (in/home/saasbook/Documents/projects/Bookkeeper/app/assets/stylesheets/application.css.sass)
提取的来源如下:
<%= 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并遵循本教程后发生此错误
在摘录下面,它表明错误在:
app/views/layouts/application.html.erb:5:in_app_views_layouts_application_html_erb__226809778_88444660'
我的代码
application.html.erb
<%= 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 %>
<%= yield %>
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"
该页面在红色边框顶部显示此标题,这有什么帮助吗?
ExecJS::ProgramError in Portal#index
1> 小智..:
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
而不是降级`autoprefixer-rails` gem版本添加`gem&#39;therubyracer&#39;,平台:: ruby`帮助我摆脱了报告的错误.谢谢.