首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >向Amazon部署带有Sinatra 2.0.0beta 2的Rails 5应用程序时出错

向Amazon部署带有Sinatra 2.0.0beta 2的Rails 5应用程序时出错
EN

Stack Overflow用户
提问于 2016-09-18 23:23:55
回答 1查看 298关注 0票数 7

我遇到了一个辛纳特拉 2.0.0 beta 2的异常,Rails 5被部署到Amazon v2.1.6。我已经在西纳特拉吉蒂布复制品上发布了问题所在,但有人建议我把它放在这里。

编辑:我使用ElasticBean秸秆遇到了这种情况,但正如@neal报告的那样,这种情况也发生在向EC2部署时。

重现这一问题的步骤如下:

  1. 在一个干净的目录中创建一个新的Rails 5应用程序 $ gem安装rails $ rails -版本(确认Rails 5.0.0.1) $ rails新测试-应用程序

将这一行添加到Add文件中:

代码语言:javascript
复制
gem 'sinatra', '2.0.0.beta2'
  1. 创建一个类型为“64位Amazon 2016.03 v2.1.6运行Ruby2.3(Puma)”的新的环境,Web服务器。使用所有缺省值,但将实例大小更改为t2.mall(任何较小的实例都没有足够的内存部署)
  2. 使用Web SECRET_KEY_BASE =(为此设置一个值) RAILS_ENV = production将两个新的环境变量添加到弹性豆柄环境中
  3. 将应用程序部署到这个新环境,例如使用eb命令行工具。
  4. 再部署一次
  5. 通过弹性豆柄控制台跟踪日志

结果:

代码语言:javascript
复制
-------------------------------------
/var/log/puma/puma.log
-------------------------------------
=== puma startup: 2016-08-26 02:39:12 +0000 ===
=== puma startup: 2016-08-26 02:39:12 +0000 ===
[15926] - Worker 0 (pid: 15929) booted, phase: 0
[15926] - Gracefully shutting down workers...
/opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-2.0.0.beta2/lib/sinatra/main.rb:11:in `expand_path': No such file or directory - getcwd (Errno::ENOENT)
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-2.0.0.beta2/lib/sinatra/main.rb:11:in `block in <class:Application>'
    from (eval):1:in `run?'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/sinatra-2.0.0.beta2/lib/sinatra/main.rb:26:in `block in <module:Sinatra>'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/cluster.rb:120:in `fork'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/cluster.rb:120:in `block in spawn_workers'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/cluster.rb:116:in `times'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/cluster.rb:116:in `spawn_workers'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/cluster.rb:426:in `run'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/launcher.rb:172:in `run'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/lib/puma/cli.rb:74:in `run'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/puma-3.6.0/bin/puma:10:in `<top (required)>'
    from /opt/rubies/ruby-2.3.1/bin/puma:23:in `load'
    from /opt/rubies/ruby-2.3.1/bin/puma:23:in `<top (required)>'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/cli/exec.rb:63:in `load'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/cli/exec.rb:63:in `kernel_load'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/cli/exec.rb:24:in `run'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/cli.rb:304:in `exec'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/cli.rb:11:in `start'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/exe/bundle:27:in `block in <top (required)>'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
    from /opt/rubies/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.1/exe/bundle:19:in `<top (required)>'
    from /opt/rubies/ruby-2.3.1/bin/bundle:23:in `load'
    from /opt/rubies/ruby-2.3.1/bin/bundle:23:in `<main>'
[15926] === puma shutdown: 2016-08-26 02:41:17 +0000 ===
[15926] - Goodbye!
=== puma startup: 2016-08-26 02:41:20 +0000 ===
=== puma startup: 2016-08-26 02:41:20 +0000 ===
[16296] - Worker 0 (pid: 16299) booted, phase: 0
EN

回答 1

Stack Overflow用户

发布于 2016-09-20 12:59:01

这不仅仅是豆秆的弹性问题,我可以确认它也发生在使用capistrano / EC2 Ubuntu / nginx部署rails 5应用程序时。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39563557

复制
相关文章

相似问题

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