使用pow和rvm的rails应用程序:突然pow错误启动应用程序

时间:2017-01-20 04:26:56

标签: ruby-on-rails ruby rvm rack-pow

一切运行正常且突然(没有更改设置) pow无法启动应用程序!

这是我的设置:

  • rails 4.2
  • rvm 1.28.0(使用.ruby-version和.ruby-gemset)
  • pow 0.5.0

Here is what I saw in my browser (Chrome)

这是战俘日志:

[Thu Jan 19 2017 19:35:01 GMT-0800 (PST)] ERROR '/Users/john/dev/savvy/aristotle/.powrc' failed to load:
true &&
source '/Users/john/dev/savvy/aristotle/.powrc' > /dev/null &&
env > '/var/folders/jg/_01lx50x3tngs9br0dkmq_mh0000gn/T/pow.91337.1484883301131.60339'
[Thu Jan 19 2017 19:35:01 GMT-0800 (PST)] ERROR stdout:
[Thu Jan 19 2017 19:35:01 GMT-0800 (PST)] ERROR stderr: /Users/john/.rvm/scripts/rvm: line 12: uname: command not found
/Users/john/.rvm/scripts/rvm: line 15: ps: command not found
/Users/john/dev/savvy/aristotle/.powrc: line 2: rvm: command not found

注意虽然pow日志说.powrc无法加载,但记录的错误表示未找到rvm:command 。然而,在突然发生此类错误之前就发现了rvm。

这是.powrc(在错误之前工作正常):

if [ -f "${rvm_path}/scripts/rvm" ]; then
  source "${rvm_path}/scripts/rvm"

  if [ -f ".rvmrc" ]; then
    source ".rvmrc"
  elif [ -f ".ruby-version" ] && [ -f ".ruby-gemset" ]; then
    rvm use `cat .ruby-version`@`cat .ruby-gemset`
  elif [ -f ".ruby-version"  ]; then
    rvm use `cat .ruby-version`
  fi
fi

这是我在rails应用程序根目录中的rvm信息:

ruby-2.2.1@savvy:

  system:
    uname:       "Darwin flat-top.local 14.0.0 Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64"
    system:      "osx/10.10/x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.53(1)-release (x86_64-apple-darwin14)"
    zsh:         "/bin/zsh => zsh 5.0.5 (x86_64-apple-darwin14.0)"

  rvm:
    version:      "rvm 1.28.0 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "1 hour 52 minutes 59 seconds ago"
    path:         "/Users/john/.rvm"

  ruby:
    interpreter:  "ruby"
    version:      "2.2.1p85"
    date:         "2015-02-26"
    platform:     "x86_64-darwin14"
    patchlevel:   "2015-02-26 revision 49769"
    full_version: "ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14]"

  homes:
    gem:          "/Users/john/.rvm/gems/ruby-2.2.1@savvy"
    ruby:         "/Users/john/.rvm/rubies/ruby-2.2.1"

  binaries:
    ruby:         "/Users/john/.rvm/rubies/ruby-2.2.1/bin/ruby"
    irb:          "/Users/john/.rvm/rubies/ruby-2.2.1/bin/irb"
    gem:          "/Users/john/.rvm/rubies/ruby-2.2.1/bin/gem"
    rake:         "/Users/john/.rvm/gems/ruby-2.2.1@savvy/bin/rake"

  environment:
    PATH:         "/Users/john/.rvm/gems/ruby-2.2.1@savvy/bin:/Users/john/.rvm/gems/ruby-2.2.1@global/bin:/Users/john/.rvm/rubies/ruby-2.2.1/bin:/Users/john/.rvm/bin:/Users/john/dev/savvy/aristotle/.direnv/bundler-bin:/Users/john/dev/savvy/aristotle/.direnv/bin:/Users/john/dev/savvy/aristotle/.direnv/ruby/bin:/Users/john/.pyenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"
    GEM_HOME:     "/Users/john/.rvm/gems/ruby-2.2.1@savvy"
    GEM_PATH:     "/Users/john/.rvm/gems/ruby-2.2.1@savvy:/Users/john/.rvm/gems/ruby-2.2.1@global"
    MY_RUBY_HOME: "/Users/john/.rvm/rubies/ruby-2.2.1"
    IRBRC:        "/Users/john/.rvm/rubies/ruby-2.2.1/.irbrc"
    RUBYOPT:      ""
    gemset:       "savvy"

在我的回忆中,当我在此rails应用程序中为新功能添加路由,控制器操作和视图时发生错误。

这是我到目前为止所尝试的内容:

  • 删除错误发生前我做的应用程序的更改
  • 重建了pow符号链接
  • 停止并启动战俘守护程序
  • rvm cleanup all
  • rvm稳定
  • 重新启动
  • 删除并重新安装pow

问题:在没有设置更改的操作rails / pow / rvm系统中,为什么pow突然无法启动应用程序?

我没有想法。

0 个答案:

没有答案