1

当尝试“vmc push hello”作为部署测试的 sinatra 示例应用程序时,我得到:

Time of crash:  
Sun Dec 02 14:11:52 -0800 2012  

NoMethodError: undefined method `[]' for nil:NilClass  

manifests-vmc-plugin-0.4.14/lib/manifests-vmc-plugin.rb:76:in `app_by_tag'  
manifests-vmc-plugin-0.4.14/lib/manifests-vmc-plugin.rb:81:in `find_apps'  
manifests-vmc-plugin-0.4.14/lib/manifests-vmc-plugin/plugin.rb:102  
mothership-0.3.0/lib/mothership/command.rb:78:in `instance_exec'  
mothership-0.3.0/lib/mothership/command.rb:78:in `invoke'  
mothership-0.3.0/lib/mothership/command.rb:82:in `instance_exec'  
mothership-0.3.0/lib/mothership/command.rb:82:in `invoke'  
mothership-0.3.0/lib/mothership/base.rb:50:in `execute'
vmc-0.4.2/lib/vmc/cli.rb:106:in `execute'
mothership-0.3.0/lib/mothership.rb:42:in `start'
vmc-0.4.2/bin/vmc:11
/usr/bin/vmc:19:in `load'
/usr/bin/vmc:19  

尝试使用 vmc 部署到“api.cloudfoundry.com”和使用命令“vmc push hello”和“vmc push”的微云时会发生这种情况

4

4 回答 4

2

manifests-vmc-plugin (0.4.14) 存在问题,您可以做几件事之一;

  • 使用旧版 VMC (3.2.23)
  • 如果您已经安装了 vmc 0.4.1 和 manifests-vmc-plugin 0.4.13,请卸载 VMC 0.4.2 和 manifests-vmc-plugin 0.4.14。

如果您卸载所有版本的 VMC 和 manifests-vmc-plugin,您可以重新安装 vmc 0.4.1,然后卸载 manifests-vmc-plugin 0.4.14 并重新安装 manifests-vmc-plugin 0.4.13 这应该留下与旧旧版本相对应的“新”vmc 的工作版本。

希望一切都说得通。我还应该补充一点,这个问题将在接下来的 24 小时内得到解决。

于 2012-12-03T10:23:20.137 回答
1

可以将 vmc gem 版本降级到以前的版本吗?sudo gem 卸载 vmc 并确保安全 sudo gem install vmc [working_version]

于 2012-12-03T09:54:07.393 回答
1

跑步gem update vmc为我解决了这个问题。更新为 =>manifests-vmc-plugin-0.4.17

于 2012-12-06T18:38:10.240 回答
0

进行推送时,请确保您位于正确的目录中。

作为一种解决方法,并验证此崩溃确实来自应用程序检测失败(正如堆栈跟踪似乎暗示的那样),您可以使用vmc push --path <directory of your app contents>

于 2012-12-03T09:49:25.030 回答