application.css不在资产管道中 [英] application.css not in asset pipeline

查看:119
本文介绍了application.css不在资产管道中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这是一个老问题,但是没有解决办法解决我的问题.

I know this is a old question but no amnswer is fixing my problem.

我是Ruby on Rails的新手,刚刚使用postgres数据库创建了项目,以便能够将项目上传到Heroku.

Im new to Ruby on Rails and just created project with a postgres database just to be able to upload the project to Heroku.

当我启动Rails服务器时,出现错误资产管道中不存在application.css".

When i start the rails server im getting the error "application.css is not present in the asset pipeline."

我正在使用bootstrap 4 gem,这要求您将application.css重命名为application.scss.

Im using bootstrap 4 gem and this requires that you rename the applications.css to application.scss.

我不知道怎么了.

我真的尝试了所有关于stackoverflow的答案,但都没有成功:(

I really tried every answer that is on stackoverflow without any success :(

请帮助我,我在做什么错了?

Please help me, what am i doing wrong?

这是我得到的错误:

This is the error im getting:

推荐答案

在我的情况下,我忘记在服务器中安装yarn命令.

in my case, I forgot to install yarn command in my server.

因此,请安装"yarn"在运行Rails服务器之前.否则资产:预编译";什么也不会做,不会发出警告.

so, please install "yarn" before running rails server. otherwise "assets:precompile" will do nothing and give no warning.

这篇关于application.css不在资产管道中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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