Application.css.scss 导致 Rails 4 出现问题 [英] Application.css.scss causing issue with rails 4

查看:39
本文介绍了Application.css.scss 导致 Rails 4 出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我一直在学习 ruby​​ on rails,我决定在 myrubyblog 应用程序上为我的新帖子页面添加一些样式.一切正常.几天后,我决定将 scss 从 posts.scss 文件导入到 application.css.scss 中,我得到了这个错误

So i've been learning ruby on rails and i decided to add some style to my new posts page on a myrubyblog app. Everything was working. After a few days i decided to import scss from the posts.scss file into the application.css.scss and well i get this error

RuntimeError in Home#index
Showing c:/Sites/myrubyblog/app/views/layouts/application.html.erb where line #5 raised:

Current ExecJS runtime does't support ES5. Please install node.js.
  (in c:/Sites/myrubyblog/app/assets/stylesheets/application.css.scss)
Extracted source (around line #0):

删除我的 application.css.scss 文件后,页面可以正常工作.在删除实际的 scss 代码并离开 application.css.scss 后,页面又开始出现问题.我决定删除 application.css.scss 文件.出于某种原因,这允许我在其中设置的样式显示出来,即使样式表本身已被删除.

After removing my application.css.scss file, the pages were working. Upon removing the actual scss code and leaving the application.css.scss the page began to give problems again. I decided to leave the application.css.scss file deleted. This for some reason allows for the styles i set in it to show up even though the stylesheet itself has been deleted.

推荐答案

安装 Node.js 似乎奏效了.我只需要重新启动......两次......伙计们,我猜.

Installing Node.js seemed to have worked. I just had to reboot.... twice... Thx guys i guess.

这篇关于Application.css.scss 导致 Rails 4 出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆