【问题标题】:Deploying a rails app to Elastic Beanstalk keeps failing将 Rails 应用程序部署到 Elastic Beanstalk 一直失败
【发布时间】:2016-05-16 00:54:12
【问题描述】:

当我在应用程序上运行 eb deploy 时,我收到此错误:

-hidden-@ruby:~/-hidden-$ eb deploy
WARNING: You have uncommitted changes.
Creating application version archive "app-9115-160205_135915".
Uploading -hidden-/app-9115-160205_135915.zip to S3. This may take a while.
Upload Complete.
INFO: Environment update is starting.                               
INFO: Deploying new version to instance(s).                         
ERROR: [Instance: i-024e83b0ed9b09096] Command failed on instance. Return code: 5 Output: (TRUNCATED)...ies/ruby-2.2.3/lib/ruby/gems/2.2.0/extensions/x86_64-linux/2.2.0-static/tiny_tds-0.6.2/gem_make.out
An error occurred while installing tiny_tds (0.6.2), and Bundler cannot
continue.
Make sure that `gem install tiny_tds -v '0.6.2'` succeeds before bundling. 
Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/10_bundle_install.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
ERROR: Unsuccessful command execution on instance id(s) 'i-024e83b0ed9b09096'. Aborting the operation.
ERROR: Failed to deploy application.                                

ERROR: Failed to deploy application.

我可以在本地机器和 EC2 实例上成功安装 tiny_tds,但在部署时出现此错误。我对 ruby​​、rails、git 和任何编程都非常陌生。基本上,我正在为heroku制作一个应用程序并将其转换为en EB环境。

【问题讨论】:

  • 您能否通过 ssh 连接到实例并运行 gem install tiny_tds -v '0.6.2',以便了解它失败的原因?我不熟悉这个 gem ...它是否具有本机扩展或默认配置中不存在的某些依赖项。您还可以下载日志并查找详细的错误消息。如何获取日志:docs.aws.amazon.com/elasticbeanstalk/latest/dg/…
  • 获取:tiny_tds-0.6.2.gem (100%) 构建原生扩展。这可能需要一段时间... 错误:安装 tiny_tds 时出错:错误:无法构建 gem 原生扩展。 /opt/rubies/ruby-2.2.3/bin/ruby -r ./siteconf20160208-24889-1votup9.rb extconf.rb 检查 iconv.h 中的 iconv_open()... 是 检查 sybfront.h... 否----- freetds 丢失。 ----- *** extconf.rb failed *** 由于某种原因无法创建 Makefile,可能缺少必要的库和/或头文件。检查 mkmf.log 文件以获取更多详细信息。您可能需要配置选项。
  • 所以在尝试安装本机扩展时失败。您应该通过 ssh 连接到机器并尝试运行 gem install tiny_tds。你需要额外的软件包。您可以通过在 ec2 实例上运行 gem install 来找到哪些。

标签: ruby-on-rails ruby git amazon-ec2 amazon-elastic-beanstalk


【解决方案1】:

请删除 Gemfile 中 tiny_tds 的版本
然后再试一次。

【讨论】:

    猜你喜欢
    • 2012-12-26
    • 2013-03-18
    • 2013-04-03
    • 2015-09-21
    • 2020-09-02
    • 2019-09-09
    • 2021-03-01
    • 2015-01-27
    • 2020-10-08
    相关资源
    最近更新 更多