ruby-on-railsrack-pow

pow.cx not working due to .envrc file in ruby on rails


I am trying to run the pow server but it stops when it sees the .envrc file in the root of my ruby on rails application. How do I fix this?


Solution

  • This is a known issue, which will occur for many rails users as the spring gem advises the use of a .envrc file that in used by direnv. The solution as described here is to wrap the contents of the .envrc file as follows:

    if [ "$(type -t direnv_load)" = 'function' ]; then
      # Whatever you want only direnv to execute
    fi
    

    Incidentally, you may need to change your config/development.rb file so that

    config.asset_host = 'myapp.dev

    and then need to restart the application by

    touch tmp/restart.txt