【发布时间】:2019-03-16 01:17:06
【问题描述】:
在升级 AWS Ruby 环境版本后出现应用部署问题。
这是我在部署应用程序时收到的错误:
Yarn executable was not detected in the system.
Download Yarn at https://yarnpkg.com/en/docs/install
rake aborted!
Autoprefixer doesn’t support Node v4.6.0. Update it.
/var/app/ondeck/vendor/bundle/gems/autoprefixer-rails-9.1.3/lib/autoprefixer-rails/processor.rb:163:in `runtime'
....
这是我正在使用的 Elastic Beanstalk 版本。
Puma with Ruby 2.5 running on 64bit Amazon Linux/2.8.4
有什么想法吗?
我已经设置了一个 Elastic Beanstalk 配置文件来安装 Yarn/Node。但似乎没有解决错误。 (在 React on Rails 线程中找到这个)。
container_commands:
01_node_get:
cwd: /tmp
command: 'sudo curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash -'
02_node_install:
cwd: /tmp
command: 'sudo yum -y install nodejs'
03_yarn_get:
cwd: /tmp
# don't run the command if yarn is already installed (file /usr/bin/yarn exists)
test: '[ ! -f /usr/bin/yarn ] && echo "yarn not installed"'
command: 'sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo'
04_yarn_install:
cwd: /tmp
test: '[ ! -f /usr/bin/yarn ] && echo "yarn not installed"'
command: 'sudo yum -y install yarn'
升级到 Rails 5.2。存在同样的问题。尝试在 64 位 Amazon Linux/2.6.0 上运行 Ruby 2.5 的 Puma。同样的问题。
【问题讨论】:
标签: ruby-on-rails ruby amazon-web-services