This repository has been archived by the owner. It is now read-only.

rbenv does not work well with pow #202

Closed
nogenhat opened this Issue Aug 17, 2011 · 68 comments

Comments

Projects
None yet
@nogenhat

nogenhat commented Aug 17, 2011

No description provided.

@jpantuso

This comment has been minimized.

Show comment
Hide comment
@jpantuso

jpantuso Aug 17, 2011

I can't get pow to hit anything but the system Ruby.

  • rvm has been imploded
  • I've reinstalled Pow just in case
  • Set both global and local rubies with rbenv
  • reinstalled gem
  • bundled
    (app works fine if started with rackup)

And still I get:

LoadError: no such file to load -- bundler/setup
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
etc.

jpantuso commented Aug 17, 2011

I can't get pow to hit anything but the system Ruby.

  • rvm has been imploded
  • I've reinstalled Pow just in case
  • Set both global and local rubies with rbenv
  • reinstalled gem
  • bundled
    (app works fine if started with rackup)

And still I get:

LoadError: no such file to load -- bundler/setup
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
etc.

@nogenhat

This comment has been minimized.

Show comment
Hide comment
@nogenhat

nogenhat Aug 17, 2011

Yep, i inspected the pow sources, and totay push the fix.

Sent from my iPhone

On Aug 18, 2011, at 1:14 AM, jpantusoreply@reply.github.com wrote:

I've burned a few hours on this today. I can't get pow to hit anything but the system Ruby.

  • rvm has been imploded
  • I've reinstalled Pow just in case
  • Set both global and local rubies with rbenv
  • reinstalled gem
  • bundled
    (app works fine if started with rackup)

And still I get:

LoadError: no such file to load -- bundler/setup
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
etc.

Reply to this email directly or view it on GitHub:
#202 (comment)

nogenhat commented Aug 17, 2011

Yep, i inspected the pow sources, and totay push the fix.

Sent from my iPhone

On Aug 18, 2011, at 1:14 AM, jpantusoreply@reply.github.com wrote:

I've burned a few hours on this today. I can't get pow to hit anything but the system Ruby.

  • rvm has been imploded
  • I've reinstalled Pow just in case
  • Set both global and local rubies with rbenv
  • reinstalled gem
  • bundled
    (app works fine if started with rackup)

And still I get:

LoadError: no such file to load -- bundler/setup
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
etc.

Reply to this email directly or view it on GitHub:
#202 (comment)

@mstarkman

This comment has been minimized.

Show comment
Hide comment
@mstarkman

mstarkman Aug 19, 2011

Where can the code for this be found?

mstarkman commented Aug 19, 2011

Where can the code for this be found?

@jpantuso

This comment has been minimized.

Show comment
Hide comment
@jpantuso

jpantuso Aug 19, 2011

No new commits on any branch at nzt or 37signals?

jpantuso commented Aug 19, 2011

No new commits on any branch at nzt or 37signals?

@mhfs

This comment has been minimized.

Show comment
Hide comment
@mhfs

mhfs Aug 19, 2011

Thomas Fuchs tweeted a workaround until this gets fixed.

Add this to your ~/.powconfig (changing the username of course):

export PATH="/Users/username/.rbenv/shims:/Users/username/.rbenv/bin:$PATH"

Worked for me.

Source: https://twitter.com/#!/thomasfuchs/status/102116945360465921

mhfs commented Aug 19, 2011

Thomas Fuchs tweeted a workaround until this gets fixed.

Add this to your ~/.powconfig (changing the username of course):

export PATH="/Users/username/.rbenv/shims:/Users/username/.rbenv/bin:$PATH"

Worked for me.

Source: https://twitter.com/#!/thomasfuchs/status/102116945360465921

@mstarkman

This comment has been minimized.

Show comment
Hide comment
@mstarkman

mstarkman Aug 19, 2011

Unfortunately, that fix didn't seem to work for me. I tried re-install pow as well after the config change and that didn't help either.

UPDATE: It working for me now, just needed to reboot! Thanks for posting the tweet.

mstarkman commented Aug 19, 2011

Unfortunately, that fix didn't seem to work for me. I tried re-install pow as well after the config change and that didn't help either.

UPDATE: It working for me now, just needed to reboot! Thanks for posting the tweet.

@jpantuso

This comment has been minimized.

Show comment
Hide comment
@jpantuso

jpantuso Aug 19, 2011

Worked for me. Created file, restarted via powify, all good.

-J

Typos courtesy of iPhone

On Aug 19, 2011, at 2:38 PM, mstarkman
reply@reply.github.com
wrote:

Unfortunately, that fix didn't seem to work for me. I tried re-install pow as well after the config change and that didn't help either.

Reply to this email directly or view it on GitHub:
#202 (comment)

jpantuso commented Aug 19, 2011

Worked for me. Created file, restarted via powify, all good.

-J

Typos courtesy of iPhone

On Aug 19, 2011, at 2:38 PM, mstarkman
reply@reply.github.com
wrote:

Unfortunately, that fix didn't seem to work for me. I tried re-install pow as well after the config change and that didn't help either.

Reply to this email directly or view it on GitHub:
#202 (comment)

@josh josh closed this Sep 7, 2011

@mislav

This comment has been minimized.

Show comment
Hide comment
@mislav

mislav Sep 29, 2011

Updated: this might not be optimal after all. See my comment below.

I've done this with my ~/.powconfig:

# cat ~/.powconfig 
export PATH=$(rbenv prefix)/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin

No usernames to change, no internal structure of rbenv exposed, works even when you move rbenv to another location (as long as rbenv itself is in the PATH).

mislav commented Sep 29, 2011

Updated: this might not be optimal after all. See my comment below.

I've done this with my ~/.powconfig:

# cat ~/.powconfig 
export PATH=$(rbenv prefix)/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin

No usernames to change, no internal structure of rbenv exposed, works even when you move rbenv to another location (as long as rbenv itself is in the PATH).

@asymmetric

This comment has been minimized.

Show comment
Hide comment
@asymmetric

asymmetric Oct 8, 2011

Neither of the two solutions involving ~/.powconfig worked for me, even after restarting via launchctl. Can we reopen this?

asymmetric commented Oct 8, 2011

Neither of the two solutions involving ~/.powconfig worked for me, even after restarting via launchctl. Can we reopen this?

@mislav

This comment has been minimized.

Show comment
Hide comment
@mislav

mislav Oct 8, 2011

Not sure why it doesn't work for you, but I've noticed a bug with my solution above: it skips the rbenv shims, going straight to the original binaries of the current ruby version. This skips rbenv plugins completely.

mislav commented Oct 8, 2011

Not sure why it doesn't work for you, but I've noticed a bug with my solution above: it skips the rbenv shims, going straight to the original binaries of the current ruby version. This skips rbenv plugins completely.

@levifig

This comment has been minimized.

Show comment
Hide comment
@levifig

levifig Oct 8, 2011

@asymmetric I installed powder (gem install powder), ran powder config and notice I had an issue with my .powconfig. By the way, don't use quotes while setting shell variables. My .powconfig looks like this:

export PATH=/Users/levifig/.rbenv/shims:/Users/levifig/.rbenv/bin:$PATH

Restart your shell and pow and enjoy! :)
Hope it helps!

levifig commented Oct 8, 2011

@asymmetric I installed powder (gem install powder), ran powder config and notice I had an issue with my .powconfig. By the way, don't use quotes while setting shell variables. My .powconfig looks like this:

export PATH=/Users/levifig/.rbenv/shims:/Users/levifig/.rbenv/bin:$PATH

Restart your shell and pow and enjoy! :)
Hope it helps!

@catsby

This comment has been minimized.

Show comment
Hide comment
@catsby

catsby Oct 21, 2011

If you installed rbenv via Homebrew make sure you modify that second path accordingly or you'll spend an hour wondering why this works for everyone else but you

catsby commented Oct 21, 2011

If you installed rbenv via Homebrew make sure you modify that second path accordingly or you'll spend an hour wondering why this works for everyone else but you

@asymmetric

This comment has been minimized.

Show comment
Hide comment
@asymmetric

asymmetric Oct 21, 2011

Turns out it doesn't work if you use ~ instead of specifying a full path. Any idea why that is?

asymmetric commented Oct 21, 2011

Turns out it doesn't work if you use ~ instead of specifying a full path. Any idea why that is?

@daz

This comment has been minimized.

Show comment
Hide comment
@daz

daz Nov 2, 2011

@ctshryock Which 'second path' are you referring to?

daz commented Nov 2, 2011

@ctshryock Which 'second path' are you referring to?

@catsby

This comment has been minimized.

Show comment
Hide comment
@catsby

catsby Nov 2, 2011

@ctshryock Which 'second path' are you referring to?

/Users/<username>/.rbenv/bin. After installing with Homebrew, the actual rbenv script is in /path/to/homebrew/bin

# ~/.powconfig
export PATH=/Users/clint/.rbenv/shims:/Users/clint/Developer/bin:$PATH

catsby commented Nov 2, 2011

@ctshryock Which 'second path' are you referring to?

/Users/<username>/.rbenv/bin. After installing with Homebrew, the actual rbenv script is in /path/to/homebrew/bin

# ~/.powconfig
export PATH=/Users/clint/.rbenv/shims:/Users/clint/Developer/bin:$PATH
@Gurpartap

This comment has been minimized.

Show comment
Hide comment
@Gurpartap

Gurpartap Nov 5, 2011

If anyone here is using zsh, you need to put the eval "$(rbenv init -)" in .zshenv instead of .zshrc (.zshrc only loads for shells).

Gurpartap commented Nov 5, 2011

If anyone here is using zsh, you need to put the eval "$(rbenv init -)" in .zshenv instead of .zshrc (.zshrc only loads for shells).

@gonglexin

This comment has been minimized.

Show comment
Hide comment
@gonglexin

gonglexin Nov 10, 2011

You may need to restart POW by killing it in the Activity Monitor or in Terminal after your doing the config changes

gonglexin commented Nov 10, 2011

You may need to restart POW by killing it in the Activity Monitor or in Terminal after your doing the config changes

@edsinclair

This comment has been minimized.

Show comment
Hide comment
@edsinclair

edsinclair Nov 11, 2011

Gurpartap: thank you so much for that comment regarding zsh. That saved me a lot of time. It would be great to get the rbenv and pow docs regarding the use of zsh updated so that it is clear that you need to add the PATH config and the eval lines to .zshenv rather than .zshrc in order to use pow with rbenv

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

And then of course killing POW so that it gets restarted by launchctl is necessary so that POW gets loaded in that env.

edsinclair commented Nov 11, 2011

Gurpartap: thank you so much for that comment regarding zsh. That saved me a lot of time. It would be great to get the rbenv and pow docs regarding the use of zsh updated so that it is clear that you need to add the PATH config and the eval lines to .zshenv rather than .zshrc in order to use pow with rbenv

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

And then of course killing POW so that it gets restarted by launchctl is necessary so that POW gets loaded in that env.

@catsby

This comment has been minimized.

Show comment
Hide comment
@catsby

catsby Nov 11, 2011

@edsinclair I'm not sure the docs are wrong; I don't have anything in my .zshenv and I have rbenv working fine with Pow

catsby commented Nov 11, 2011

@edsinclair I'm not sure the docs are wrong; I don't have anything in my .zshenv and I have rbenv working fine with Pow

@edsinclair

This comment has been minimized.

Show comment
Hide comment
@edsinclair

edsinclair Nov 11, 2011

Interesting. I tested this a bit restarting pow each time and can confirm that on my system POW does not find rbenv unless I put the shell configuration lines in .zshenv rather than .zshrc. Not sure if this issue with how .zsh is installed or which version of zsh one runs. I guess the docs may be correct for some, but if you have an issue it is worth a try to put the rbenv shell config lines in .zshenv.

edsinclair commented Nov 11, 2011

Interesting. I tested this a bit restarting pow each time and can confirm that on my system POW does not find rbenv unless I put the shell configuration lines in .zshenv rather than .zshrc. Not sure if this issue with how .zsh is installed or which version of zsh one runs. I guess the docs may be correct for some, but if you have an issue it is worth a try to put the rbenv shell config lines in .zshenv.

@catsby

This comment has been minimized.

Show comment
Hide comment
@catsby

catsby Nov 11, 2011

@edsinclair what about your ~/.powconfig?
My rbenv is in ~/Developer/bin
export PATH=/Users/clint/.rbenv/shims:/Users/clint/Developer/bin:$PATH

catsby commented Nov 11, 2011

@edsinclair what about your ~/.powconfig?
My rbenv is in ~/Developer/bin
export PATH=/Users/clint/.rbenv/shims:/Users/clint/Developer/bin:$PATH

@edsinclair

This comment has been minimized.

Show comment
Hide comment
@edsinclair

edsinclair Nov 11, 2011

@ctshryock ah that works as well. Thanks for that. Though I tried it using the $HOME shell variable and that did not work as @asymmetric pointed out above regarding the ~ home dir alias. Not sure I feel entirely comfortable with a solution that requires hardcoding the path as @mislav pointed out in his imperfect solution... So I may stick with the .zshenv solution as it seems like there may be other processes besides POW that I'd want using rbenv. For example in the past I've written/used ruby scripts that run via launchctl.

It does seem like a mention of using .zshenv instead of .zshrc would be worth mentioning in the rbenv docs. So I should have made that comment over there, instead of here :)

Thanks again.

edsinclair commented Nov 11, 2011

@ctshryock ah that works as well. Thanks for that. Though I tried it using the $HOME shell variable and that did not work as @asymmetric pointed out above regarding the ~ home dir alias. Not sure I feel entirely comfortable with a solution that requires hardcoding the path as @mislav pointed out in his imperfect solution... So I may stick with the .zshenv solution as it seems like there may be other processes besides POW that I'd want using rbenv. For example in the past I've written/used ruby scripts that run via launchctl.

It does seem like a mention of using .zshenv instead of .zshrc would be worth mentioning in the rbenv docs. So I should have made that comment over there, instead of here :)

Thanks again.

@Gurpartap

This comment has been minimized.

Show comment
Hide comment
@Gurpartap

Gurpartap Nov 11, 2011

Afaik, .zshrc is just for the shells and to loads the evn variables for both shells and programs, you have to put them in .zshenv. That is how pow gets to discover rbenv.

Gurpartap commented Nov 11, 2011

Afaik, .zshrc is just for the shells and to loads the evn variables for both shells and programs, you have to put them in .zshenv. That is how pow gets to discover rbenv.

@prathe

This comment has been minimized.

Show comment
Hide comment
@prathe

prathe Nov 25, 2011

Thanks @Gurpartap, you made me realize I was setting it in both zshrc and zshenv.

prathe commented Nov 25, 2011

Thanks @Gurpartap, you made me realize I was setting it in both zshrc and zshenv.

@mystix

This comment has been minimized.

Show comment
Hide comment
@mystix

mystix Feb 21, 2012

Just a quick update: using /Users/whoami`` in place of $HOME in `.zshenv` works, removing the need to hardcode the home path.

mystix commented Feb 21, 2012

Just a quick update: using /Users/whoami`` in place of $HOME in `.zshenv` works, removing the need to hardcode the home path.

@tfwright

This comment has been minimized.

Show comment
Hide comment
@tfwright

tfwright Mar 4, 2012

Just had this issue. With fresh install of Lion/rbenv. Resolved as per comments above by adding the following to ~/.powconfig, but I also had to reboot the machine.

export PATH=/Users/whoami/.rbenv/shims:/Users/whoami/Developer/bin:$PATH

tfwright commented Mar 4, 2012

Just had this issue. With fresh install of Lion/rbenv. Resolved as per comments above by adding the following to ~/.powconfig, but I also had to reboot the machine.

export PATH=/Users/whoami/.rbenv/shims:/Users/whoami/Developer/bin:$PATH

@soffes

This comment has been minimized.

Show comment
Hide comment
@soffes

soffes Jun 7, 2012

I'm running ZSH on Lion. The only change I had to do was edit the path in ~/.powconfig. This worked for me:

$ cat ~/.powconfig
export PATH="/Users/`whoami`/.rbenv/shims:$PATH"

soffes commented Jun 7, 2012

I'm running ZSH on Lion. The only change I had to do was edit the path in ~/.powconfig. This worked for me:

$ cat ~/.powconfig
export PATH="/Users/`whoami`/.rbenv/shims:$PATH"
@sstephenson

This comment has been minimized.

Show comment
Hide comment
@sstephenson

sstephenson Jun 7, 2012

Contributor

Note: Zsh users won't need to make any changes to ~/.powconfig in the upcoming 0.4.0 release. We are now going to great lengths to load the login environment no matter what your shell is :)
https://github.com/37signals/pow/blob/master/src/util.coffee#L143-239

Contributor

sstephenson commented Jun 7, 2012

Note: Zsh users won't need to make any changes to ~/.powconfig in the upcoming 0.4.0 release. We are now going to great lengths to load the login environment no matter what your shell is :)
https://github.com/37signals/pow/blob/master/src/util.coffee#L143-239

@soffes

This comment has been minimized.

Show comment
Hide comment
@soffes

soffes Jun 7, 2012

@sstephenson I just installed the latest (the install script said 0.4.0) and it was using system ruby. I added back my .powconfig and it started working again.

soffes commented Jun 7, 2012

@sstephenson I just installed the latest (the install script said 0.4.0) and it was using system ruby. I added back my .powconfig and it started working again.

@camdub

This comment has been minimized.

Show comment
Hide comment
@camdub

camdub Oct 8, 2012

@Insside here is the output:

/Users/camdub/Developer/.rbenv/shims:/Users/camdub/Developer/.rbenv/bin:/Users/camdub/Developer/bin:/Users/camdub/Developer/Cellar/python/2.7.1/bin:/Users/camdub/Developer/share/python:/Users/camdub/Developer/sbin:/Users/camdub/Developer/.rbenv/shims:/Users/camdub/Developer/.rbenv/bin:/Users/camdub/Developer/bin:/Users/camdub/Developer/Cellar/python/2.7.1/bin:/Users/camdub/Developer/share/python:/Users/camdub/Developer/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

camdub commented Oct 8, 2012

@Insside here is the output:

/Users/camdub/Developer/.rbenv/shims:/Users/camdub/Developer/.rbenv/bin:/Users/camdub/Developer/bin:/Users/camdub/Developer/Cellar/python/2.7.1/bin:/Users/camdub/Developer/share/python:/Users/camdub/Developer/sbin:/Users/camdub/Developer/.rbenv/shims:/Users/camdub/Developer/.rbenv/bin:/Users/camdub/Developer/bin:/Users/camdub/Developer/Cellar/python/2.7.1/bin:/Users/camdub/Developer/share/python:/Users/camdub/Developer/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

@camdub

This comment has been minimized.

Show comment
Hide comment
@camdub

camdub Oct 8, 2012

Fixed my own problem. For some reason, I had two shims directories--one in ~/.rbenv/shims and one (as seen above) in ~/Developer/.rbenv/shims. Editing my ~/.powconfig to use the shims path in ~/Developer fixed the issue.

camdub commented Oct 8, 2012

Fixed my own problem. For some reason, I had two shims directories--one in ~/.rbenv/shims and one (as seen above) in ~/Developer/.rbenv/shims. Editing my ~/.powconfig to use the shims path in ~/Developer fixed the issue.

@jmccartie

This comment has been minimized.

Show comment
Hide comment
@jmccartie

jmccartie Oct 18, 2012

Git installed rbenv and rbenv-build. getting the LoadError: cannot load such file -- bundler/setup error. Tried @Insside 's solution above by adding export PATH=brew --prefix rbenv/shims:brew --prefix rbenv/bin:$PATH to my ~/.powconfig and restarting. No dice.

Here's my path:

/Users/jon/.rbenv/shims:/Users/jon/.rbenv/bin:/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:

And here's the error:

LoadError: cannot load such file -- bundler/setup
~/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

Any help?

Running OS X 10.8.2

jmccartie commented Oct 18, 2012

Git installed rbenv and rbenv-build. getting the LoadError: cannot load such file -- bundler/setup error. Tried @Insside 's solution above by adding export PATH=brew --prefix rbenv/shims:brew --prefix rbenv/bin:$PATH to my ~/.powconfig and restarting. No dice.

Here's my path:

/Users/jon/.rbenv/shims:/Users/jon/.rbenv/bin:/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:

And here's the error:

LoadError: cannot load such file -- bundler/setup
~/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

Any help?

Running OS X 10.8.2

@esambo

This comment has been minimized.

Show comment
Hide comment
@esambo

esambo Oct 18, 2012

@jmccartie Verify the contents of you rbenv shims /Users/jon/.rbenv/shims and bin /Users/jon/.rbenv/bin directory that you mentioned in your PATH. One of them was empty for me because it was in /usr/local/... (because I installed rbenv through Homebrew).
I just uninstalled rbenv and ruby-build (brew uninstall rbenv ruby-build) and installed it without Homebrew (based on [https://github.com/sstephenson/rbenv#-21-basic-github-checkout](/rbenv: 2.1 Basic GitHub Checkout) and [https://github.com/sstephenson/ruby-build#installing-as-an-rbenv-plugin-recommended](ruby-build: Installing as an rbenv plugin %28recommended%29) which fixed this issue.

esambo commented Oct 18, 2012

@jmccartie Verify the contents of you rbenv shims /Users/jon/.rbenv/shims and bin /Users/jon/.rbenv/bin directory that you mentioned in your PATH. One of them was empty for me because it was in /usr/local/... (because I installed rbenv through Homebrew).
I just uninstalled rbenv and ruby-build (brew uninstall rbenv ruby-build) and installed it without Homebrew (based on [https://github.com/sstephenson/rbenv#-21-basic-github-checkout](/rbenv: 2.1 Basic GitHub Checkout) and [https://github.com/sstephenson/ruby-build#installing-as-an-rbenv-plugin-recommended](ruby-build: Installing as an rbenv plugin %28recommended%29) which fixed this issue.

@jmccartie

This comment has been minimized.

Show comment
Hide comment
@jmccartie

jmccartie Oct 18, 2012

Issue resolved.

Someone had placed stuff into .powenv which was jacking with things. Thanks @esambo

jmccartie commented Oct 18, 2012

Issue resolved.

Someone had placed stuff into .powenv which was jacking with things. Thanks @esambo

@sj26

This comment has been minimized.

Show comment
Hide comment
@sj26

sj26 Nov 29, 2012

Contributor

This worked for me, in ~/.powconfig:

export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
Contributor

sj26 commented Nov 29, 2012

This worked for me, in ~/.powconfig:

export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH"
@xurde

This comment has been minimized.

Show comment
Hide comment
@xurde

xurde Dec 24, 2012

@sj26 Thanks
Worked for me as well.

xurde commented Dec 24, 2012

@sj26 Thanks
Worked for me as well.

@cointilt

This comment has been minimized.

Show comment
Hide comment
@cointilt

cointilt Dec 27, 2012

I fixed this by installing the gem powify:

gem install powify

I then add the following script to ~/powconfig:

export PATH="/Users/username/.rbenv/shims:/Users/username/.rbenv/bin:$PATH"

Replacing username with the same dir as your username. I am sure there is a dynamic way that works but I ran into trouble with that.

I then ran the install script for pow again:

curl get.pow.cx/install.sh | sh

And last command I ran was:

powify restart railsappname

Replace railsappname with the name of your rails app

I another thing you must make sure when using rbenv is to run gem install bundler on each version of rails you have installed.

cointilt commented Dec 27, 2012

I fixed this by installing the gem powify:

gem install powify

I then add the following script to ~/powconfig:

export PATH="/Users/username/.rbenv/shims:/Users/username/.rbenv/bin:$PATH"

Replacing username with the same dir as your username. I am sure there is a dynamic way that works but I ran into trouble with that.

I then ran the install script for pow again:

curl get.pow.cx/install.sh | sh

And last command I ran was:

powify restart railsappname

Replace railsappname with the name of your rails app

I another thing you must make sure when using rbenv is to run gem install bundler on each version of rails you have installed.

@jhubert

This comment has been minimized.

Show comment
Hide comment
@jhubert

jhubert Apr 19, 2013

Just to confirm, we recently had this problem and we were getting the following error:

Bundler::RubyVersionMismatch: Your Ruby version is 1.8.7, but your Gemfile specified 1.9.3

The problem was that he was running zshell and it wasn't initializing rbenv before pow ran. We fixed it using Gurpartap and edsinclair's advice above. Killing pow using Activity Monitor was the important part.

jhubert commented Apr 19, 2013

Just to confirm, we recently had this problem and we were getting the following error:

Bundler::RubyVersionMismatch: Your Ruby version is 1.8.7, but your Gemfile specified 1.9.3

The problem was that he was running zshell and it wasn't initializing rbenv before pow ran. We fixed it using Gurpartap and edsinclair's advice above. Killing pow using Activity Monitor was the important part.

@tvdeyen

This comment has been minimized.

Show comment
Hide comment
@tvdeyen

tvdeyen Apr 22, 2013

Thanks @esambo

This worked for me:
Create or modify: ~/.powconfig with:

eval $(rbenv init -)
export PATH=$(rbenv root)/shims:$(rbenv root)/bin:$PATH

and then restart pow: touch ~/.pow/restart.txt

Works great for Pow 0.4.0 via homebrew under 10.8.3 ❤️

tvdeyen commented Apr 22, 2013

Thanks @esambo

This worked for me:
Create or modify: ~/.powconfig with:

eval $(rbenv init -)
export PATH=$(rbenv root)/shims:$(rbenv root)/bin:$PATH

and then restart pow: touch ~/.pow/restart.txt

Works great for Pow 0.4.0 via homebrew under 10.8.3 ❤️

@guidobouman

This comment has been minimized.

Show comment
Hide comment
@guidobouman

guidobouman Jul 18, 2013

I prefer moving the following from my .zshrc file to my .zshenv file:

# Initialize rbenv
eval "$(rbenv init -)"

That's because it fixes the issue for each app that does not load the shell, but does load the environment. In that way you don't have any duplicated configurations as it will not be inside your .zshrc file anymore and there's no need to copy it to your ~/.powconfig. Also, the init command adds the shims to PATH, so no need to add those separately. (https://github.com/sstephenson/rbenv#homebrew-on-mac-os-x)

By the way @sstephenson, this issue was still existent for me on v0.4.1.

> dscl . -read ~ UserShell
UserShell: /bin/zsh

guidobouman commented Jul 18, 2013

I prefer moving the following from my .zshrc file to my .zshenv file:

# Initialize rbenv
eval "$(rbenv init -)"

That's because it fixes the issue for each app that does not load the shell, but does load the environment. In that way you don't have any duplicated configurations as it will not be inside your .zshrc file anymore and there's no need to copy it to your ~/.powconfig. Also, the init command adds the shims to PATH, so no need to add those separately. (https://github.com/sstephenson/rbenv#homebrew-on-mac-os-x)

By the way @sstephenson, this issue was still existent for me on v0.4.1.

> dscl . -read ~ UserShell
UserShell: /bin/zsh
@chourobin

This comment has been minimized.

Show comment
Hide comment
@chourobin

chourobin Oct 4, 2013

I installed pow with Homebrew and edited the correct path in my .powconfig file. It wasn't working until I restarted pow using lunchy:

lunchy restart pow

chourobin commented Oct 4, 2013

I installed pow with Homebrew and edited the correct path in my .powconfig file. It wasn't working until I restarted pow using lunchy:

lunchy restart pow
@mariozaizar

This comment has been minimized.

Show comment
Hide comment
@mariozaizar

mariozaizar Oct 24, 2013

I just upgrade to OSX Mavericks and the issue is back.
I tried with export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" and:

eval $(rbenv init -)
export PATH=$(rbenv root)/shims:$(rbenv root)/bin:$PATH

Brew doctor says everything is OK. I reinstalled the gem and pow. Restarted the process and terminal. Nothing works.
If I install bundler on @global it works. But now, pow is ignoring my .ruby-version (so trying to use ruby2 from the system)

mariozaizar commented Oct 24, 2013

I just upgrade to OSX Mavericks and the issue is back.
I tried with export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:$PATH" and:

eval $(rbenv init -)
export PATH=$(rbenv root)/shims:$(rbenv root)/bin:$PATH

Brew doctor says everything is OK. I reinstalled the gem and pow. Restarted the process and terminal. Nothing works.
If I install bundler on @global it works. But now, pow is ignoring my .ruby-version (so trying to use ruby2 from the system)

@sj26

This comment has been minimized.

Show comment
Hide comment
@sj26

sj26 Oct 24, 2013

Contributor

No issues with mavericks here.

Make sure you've got those lines in your ~/.powconfig and have restarted pow? You can also check the logs in Console.

Contributor

sj26 commented Oct 24, 2013

No issues with mavericks here.

Make sure you've got those lines in your ~/.powconfig and have restarted pow? You can also check the logs in Console.

@rrichards

This comment has been minimized.

Show comment
Hide comment
@rrichards

rrichards Oct 26, 2013

Also have the issue with Mavericks

-- update

I think it may be because im using an rbenv gemset via the rbenv-gemset plugin. Ill try without it.

rrichards commented Oct 26, 2013

Also have the issue with Mavericks

-- update

I think it may be because im using an rbenv gemset via the rbenv-gemset plugin. Ill try without it.

@mikker

This comment has been minimized.

Show comment
Hide comment
@mikker

mikker Oct 31, 2013

Fixed this problem on Mavericks using both pow and rbenv from Homebrew:

export RBENV_ROOT=/usr/local/var/rbenv # <-- this was what I needed
eval $(rbenv init -)
export PATH=$(rbenv root)/shims:$(rbenv root)/bin:$PATH

mikker commented Oct 31, 2013

Fixed this problem on Mavericks using both pow and rbenv from Homebrew:

export RBENV_ROOT=/usr/local/var/rbenv # <-- this was what I needed
eval $(rbenv init -)
export PATH=$(rbenv root)/shims:$(rbenv root)/bin:$PATH
@guidobouman

This comment has been minimized.

Show comment
Hide comment
@guidobouman

guidobouman Oct 31, 2013

This has been accounted for in #358.

Only .zshrc would not properly be picked up. Now it is. Get the most recent version of pow and all the weird customisations should not be needed.

If you don't want to install pow from GitHub, see my earlier comment for my setup that has not ever had issues, even on Mavericks. (#202 (comment))

guidobouman commented Oct 31, 2013

This has been accounted for in #358.

Only .zshrc would not properly be picked up. Now it is. Get the most recent version of pow and all the weird customisations should not be needed.

If you don't want to install pow from GitHub, see my earlier comment for my setup that has not ever had issues, even on Mavericks. (#202 (comment))

@victorngkp

This comment has been minimized.

Show comment
Hide comment
@victorngkp

victorngkp May 28, 2014

For all who have added a .powconfig configuration file, restarted, etc. and to no avail, make sure you do not have a .ruby-version in your home directory ~/.ruby-version. If you had, delete it.

victorngkp commented May 28, 2014

For all who have added a .powconfig configuration file, restarted, etc. and to no avail, make sure you do not have a .ruby-version in your home directory ~/.ruby-version. If you had, delete it.

@gabrieljoelc

This comment has been minimized.

Show comment
Hide comment
@gabrieljoelc

gabrieljoelc Sep 22, 2014

@victorngkp 👍. Didn't do any of the above except for delete my accidental ~/.ruby-version and it fixed all the things.

gabrieljoelc commented Sep 22, 2014

@victorngkp 👍. Didn't do any of the above except for delete my accidental ~/.ruby-version and it fixed all the things.

@erichurst

This comment has been minimized.

Show comment
Hide comment
@erichurst

erichurst Oct 23, 2014

👍 @victorngkp. Forgot I had that .ruby-version file in the home dir. Thanks for the reminder.

erichurst commented Oct 23, 2014

👍 @victorngkp. Forgot I had that .ruby-version file in the home dir. Thanks for the reminder.

@tsmango

This comment has been minimized.

Show comment
Hide comment
@tsmango

tsmango commented Feb 1, 2015

@victorngkp 👍 Thanks!

@lacostenycoder

This comment has been minimized.

Show comment
Hide comment
@lacostenycoder

lacostenycoder commented Sep 17, 2015

one more 👍 @victorngkp

@christianRakete

This comment has been minimized.

Show comment
Hide comment
@christianRakete

christianRakete commented Nov 6, 2016

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