Skip to content

Instantly share code, notes, and snippets.

@brookr
Forked from derekharmel/gist:2399684
Created April 25, 2012 21:34
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save brookr/2493622 to your computer and use it in GitHub Desktop.
Save brookr/2493622 to your computer and use it in GitHub Desktop.
How to fix pow not using the correct gemset
# From the project root
rvm env -- `rvm current` >> .powenv
@neohunter
Copy link

so pow dont use the ruby-gemset YET?

@jetsgit
Copy link

jetsgit commented Feb 3, 2016

Pow is using

.ruby-gemset   .ruby-version

as of Pow v.0.5.0

@denro solution is still necessary, tho

@kWhittington
Copy link

@jetsgit, do you still need to configure a .powrc to accept the .ruby-gemset and .ruby-version files correctly? Like in this gist: https://gist.github.com/nbibler/5307941 ?

@jetsgit
Copy link

jetsgit commented Mar 9, 2016

@kWhittington, ---I discovered the solution @denro mentioned is still necessary and still works great.

@jetsgit
Copy link

jetsgit commented Oct 5, 2016

If you wish to debug using POW and pry-remote, you can do the following:
echo 3000 > ~/.pow/yourapp

However, that will cause an annoying error, e.g.:

/Users/jet/.rvm/hooks/after_use_update_powrc:6: parse error: condition expected: /Users/jet/Rails_Projects/puget-sound-salmon

To fix that, modify the bash script to the following, which will only exec on symlinks:

# ~/.rvm/hooks/after_use_update_powrc

for file in `ls ~/.pow/` ; do
  POW_LINK_TARGET=`readlink ~/.pow/$file`
  if [ -L "$POW_LINK_TARGET" ]; then
    if [ `pwd` = $POW_LINK_TARGET  ]; then 
      rvm env -- ``rvm current`` > .powenv
    fi
  fi
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment