ruby-on-rails - 安装 SASSC gem 时出现 AWS Codebuild 错误 ruby 版本错误
问题描述
我正在运行一个 Codestar 项目。示例应用程序安装良好。当我使用 SASSC 添加我的应用程序时,由于 Ruby 版本而失败。有没有通知 CodeBuild 升级 Ruby 版本?尝试查看 buildspec.yml 我在附近吗?试图谷歌。
在构建日志中间
Installing sassc 2.0.0 with native extensions
Gem::InstallError: sassc requires Ruby version >= 2.3.3.
在构建日志结束时
An error occurred while installing sassc (2.0.0), and Bundler cannot continue.
Make sure that `gem install sassc -v '2.0.0'` succeeds before bundling.
[Container] 2018/12/31 04:17:42 Command did not exit successfully bundle install exit status 5
[Container] 2018/12/31 04:17:42 Phase complete: INSTALL Success: false
[Container] 2018/12/31 04:17:42 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: bundle install. Reason: exit status 5
谢谢。
解决方案
我使用 Ruby 2.5.3 将 Codebuild 环境从 AWS Linux 发行版更改为 Ubuntu,这解决了我的问题。除非有人有更好的答案。
推荐阅读
- wpf - 为什么 WPF/XAML 绑定使用 x:Reference 气质?
- linux - 在 sh 脚本中重定向 STDOUT 和 STDERR 失败
- mysql - 在mysql中将特定数据从一个表复制到另一个表
- c++ - C++:我的程序的平均输出没有正确显示
- python - 有没有更简洁的方法来有条件地循环数据框中的行?
- python - 在 Python 中下采样变量并插入 NaN
- c# - 如何配置.net core angular azure AD 身份验证?
- postgresql - 在 postgresql 中查询历史表以查找给定日期的状态
- javascript - 将 if 语句添加到 var 变量中
- performance - 局域网传输速度明显不同