无法启动Amazon弹性豆茎—Ruby (Rack)应用程序

时间:2023-01-26 13:05:39

I want to host my rails website on Amazon Elestic Beanstalk. I followed this guide : http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html.

我想在Amazon Elestic Beanstalk上托管我的rails网站。我遵循了这个指南:http://docs.amazonwebservices.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html。

Now, I have this error : Ruby (Rack) application could not be started

现在,我有一个错误:无法启动Ruby (Rack)应用程序

Error message:

错误信息:

Could not find rake-10.0.2 in any of the sources (Bundler::GemNotFound) Exception class:

PhusionPassenger::UnknownError Application root:

/var/app/current

0 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/spec_set.rb 90 in `block in materialize'

0 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1 / lib /打包机/ spec_set。rb90 in ' block in materialize'

1 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/spec_set.rb 83 in `map!'

1 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1 / lib /打包机/ spec_set。rb 83年“地图!”

2 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/spec_set.rb 83 in `materialize'

2 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1 / lib /打包机/ spec_set。rb 83年“实现”

3 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb 113 in `specs'

3 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1 / lib /打包机/定义。rb 113年“规格”

4 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb 158 in `specs_for'

4 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1 / lib /打包机/定义。rb 158年“specs_for”

5 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/definition.rb 147 in `requested_specs'

5 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1 / lib /打包机/定义。rb 147年“requested_specs”

6 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/environment.rb 23 in `requested_specs'

6 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1 / lib /打包机/环境。rb 23日在“requested_specs”

7 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/runtime.rb 11 in `setup'

7 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1 / lib /打包机/运行时。rb 11“设置”

8 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1/lib/bundler.rb 116 in `setup'

8 /usr/share/ruby/1.9/gems/1.9.1/gems/bundler-1.2.1 / lib /打包机。rb 116年“设置”

9 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/utils.rb 326 in `prepare_app_process'

9 /var/lib/passenger-standalone / 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger /跑龙套。rb 326年“prepare_app_process”

10 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/rack/application_spawner.rb 156 in `block in initialize_server'

10 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger /架/ application_spawner。rb156在“initialize_server中的块”中

11 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/utils.rb 563 in `report_app_init_status'

11 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger /跑龙套。rb 563年“report_app_init_status”

12 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/rack/application_spawner.rb 154 in `initialize_server'

12 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger /架/ application_spawner。rb 154年“initialize_server”

13 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/abstract_server.rb 204 in `start_synchronously'

13 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger / abstract_server。rb 204年“start_synchronously”

14 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/abstract_server.rb 180 in `start'

14 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger / abstract_server。rb 180年“开始”

15 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/rack/application_spawner.rb 129 in `start'

15 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger /架/ application_spawner。rb 129年“开始”

16 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/spawn_manager_orig.rb 253 in `block (2 levels) in spawn_rack_application'

16 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger / spawn_manager_orig。rb253在‘block(2层)in spawn_rack_application’中

17 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/abstract_server_collection.rb 132 in `lookup_or_add'

17 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger / abstract_server_collection。rb 132年“lookup_or_add”

18 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/spawn_manager_orig.rb 246 in `block in spawn_rack_application'

18 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger / spawn_manager_orig。rb246在“spawn_rack_application”中的“块”

19 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/abstract_server_collection.rb 82 in `block in synchronize'

19 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger / abstract_server_collection。rb82在“块同步”中

20 prelude> 10:in `synchronize'

20前奏> 10:在“同步”

21 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/abstract_server_collection.rb 79 in `synchronize'

21 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger / abstract_server_collection。rb 79年“同步”

22 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/spawn_manager_orig.rb 244 in `spawn_rack_application'

22 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger / spawn_manager_orig。rb 244年“spawn_rack_application”

23 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/spawn_manager_orig.rb 137 in `spawn_application'

23 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger / spawn_manager_orig。rb 137年“spawn_application”

24 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/spawn_manager.rb 16 in `spawn_application_with_env'

24 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger / spawn_manager。rb 16“spawn_application_with_env”

25 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/spawn_manager_orig.rb 275 in `handle_spawn_application'

25 /var/lib/passenger-standalone / 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger / spawn_manager_orig。rb 275年“handle_spawn_application”

26 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/abstract_server.rb 357 in `server_main_loop'

26 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger / abstract_server。rb 357年“server_main_loop”

27 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/lib/phusion_passenger/abstract_server.rb 206 in `start_synchronously'

27 /var/lib/passenger-standalone 3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002 /支持/ lib / phusion_passenger / abstract_server。rb 206年“start_synchronously”

28 /var/lib/passenger-standalone/3.0.17-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/support/helper-scripts/passenger-spawn-server 99 in `'

28 /var/lib/passenger- independence /3.0.17-x86_64-ruby1.9.3-linux- gcc4.6 -1002/support/helper-scripts/passenger-spawn-server 99 in "

Nothing one the trace in on my source code. I didn't found anything on the Internet. You can find the source code of the application here : https://github.com/GCorbel/comment-my-projects.

我的源代码里没有任何痕迹。我在网上什么也没找到。您可以在这里找到应用程序的源代码:https://github.com/gcorbel/comm-my-projects。

1 个解决方案

#1


3  

I was experiencing that, and found out that this isn't related with rake itself. That's happening probably because one of your gems isn't getting installed. In my case, it was pg that wasn't getting installed since it needs the pg_config executable.

我正在经历这些,发现这和rake本身没有关系。这可能是因为您的一个gem没有安装。在我的例子中,是pg没有安装,因为它需要pg_config可执行文件。

So, in my case, to fix that, I added the following sections to .ebextensions/default.config:

因此,在我的例子中,为了解决这个问题,我在. ebextense /default.config中添加了以下部分:

packages:
  yum:
    git: []
    postgresql-devel: []

# Run rake tasks before an application deployment
container_commands:
  01bundler-pg:
    command: bundle config build.pg --with-pg-config=/usr/bin/pg_config

Even if you don't use pg, check if any of your gems needs development headers or executable files installed.

即使您不使用pg,也要检查您的gems是否需要安装开发头或可执行文件。

Reference: https://forums.aws.amazon.com/thread.jspa?messageID=400055

参考:https://forums.aws.amazon.com/thread.jspa?messageID=400055

#1


3  

I was experiencing that, and found out that this isn't related with rake itself. That's happening probably because one of your gems isn't getting installed. In my case, it was pg that wasn't getting installed since it needs the pg_config executable.

我正在经历这些,发现这和rake本身没有关系。这可能是因为您的一个gem没有安装。在我的例子中,是pg没有安装,因为它需要pg_config可执行文件。

So, in my case, to fix that, I added the following sections to .ebextensions/default.config:

因此,在我的例子中,为了解决这个问题,我在. ebextense /default.config中添加了以下部分:

packages:
  yum:
    git: []
    postgresql-devel: []

# Run rake tasks before an application deployment
container_commands:
  01bundler-pg:
    command: bundle config build.pg --with-pg-config=/usr/bin/pg_config

Even if you don't use pg, check if any of your gems needs development headers or executable files installed.

即使您不使用pg,也要检查您的gems是否需要安装开发头或可执行文件。

Reference: https://forums.aws.amazon.com/thread.jspa?messageID=400055

参考:https://forums.aws.amazon.com/thread.jspa?messageID=400055