首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Rails 6应用程序没有部署到Heroku -未知语法错误:不支持选项名(“-无进展”)

Rails 6应用程序没有部署到Heroku -未知语法错误:不支持选项名(“-无进展”)
EN

Stack Overflow用户
提问于 2021-12-28 23:08:19
回答 1查看 181关注 0票数 0

我试图将Rails 6应用程序部署到Heroku,并遇到以下错误:

代码语言:javascript
复制
remote: -----> Preparing app for Rails asset pipeline
remote:        Running: rake assets:precompile
remote:        Unknown Syntax Error: Unsupported option name ("--no-progress").
remote:        
remote:        $ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]
remote: 
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote: 
remote:  !     Push failed

通过谷歌搜索,我认为这可能与纱线有关。有人有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2022-01-23 16:54:54

我安装了纱版本3.1.1。当我试图预编译Rails 5.2应用程序的生产资产时,我在终端中得到了这个错误。我将纱线版本降至1.22.17,并成功地预编译了我的资产,没有出现错误。

以下是终端命令和消息。

代码语言:javascript
复制
[railsappfolder] (master) rake assets:precompile RAILS_ENV=production
Unknown Syntax Error: Unsupported option name ("--no-progress").

$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]
[railsappfolder] (master) yarn set version 1.22.17
➤ YN0000: Retrieving https://github.com/yarnpkg/yarn/releases/download/v1.22.17/yarn-1.22.17.js
➤ YN0000: Saving the new release in .yarn/releases/yarn-1.22.17.cjs
➤ YN0000: Done in 1s 665ms
[railsappfolder] (master) rake assets:precompile RAILS_ENV=production
yarn install v1.22.17
[1/4]   Resolving packages...
[2/4]   Fetching packages...
[3/4]   Linking dependencies...
[4/4]   Building fresh packages...
success Saved lockfile.
✨  Done in 0.05s.
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70513481

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档