rails app with pow and rvm: sudden pow error starting app

116 views Asked by At

Everything was running fine and suddenly (with no changes to the setup) pow can no longer start the app!

Here's my setup:

  • rails 4.2
  • rvm 1.28.0 (with .ruby-version and .ruby-gemset)
  • pow 0.5.0

Here is what I saw in my browser (Chrome)

Here is the pow log:

[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

NOTICE that while the pow log says .powrc failed to load, the logged error says rvm: command not found. However rvm was found right before this pow error suddenly occurred.

Here is the .powrc (which was working fine before the error):

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

Here is my rvm info from within the root of the rails app:

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 <[email protected]>, Michal Papis <[email protected]> [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"

To the best of my recollection, the error occurred when I was adding routes, controller actions and views for a new feature in this rails app.

Here is what I have tried so far:

  • Remove the changes to the app I made immediately before the error occurred
  • Rebuilt the pow symlink
  • Stopped and started the pow daemon
  • rvm cleanup all
  • rvm get stable
  • reboot
  • remove and re-install pow

QUESTION: In an operational rails/pow/rvm system with no setup changes, why does pow suddenly fail to start the app?

I'm out of ideas.

0

There are 0 answers