-
Notifications
You must be signed in to change notification settings - Fork 258
.ruby-version in parent dir leads to incorrect rbenv Ruby #363
Comments
I found this gist, which sort of forces the issue locally by updating your project's .powrc with the following:
|
I got the same issue and had to delete .ruby-version in my home dir. Hope it would be fixed soon. |
I just hit this issue as well. Took me half a day to find this post. |
It usually doesn't make a lot of sense to have a .ruby-version in your home dir, that's more or less what's the rbenv global is for. I'll dig into it though. As nested projects should give the deepest .ruby-version precedence. |
Just got hit with this particular issue. It doesn't make sense to have it in your home directory, but if you've done a |
The way rbenv works is that it figures out the directory it's running in, and uses the corresponding Ruby version. Somehow rbenv believes that the home directory has precedence over the project directory... Pow does not do anything to change this behaviour. This is because rbenv replicates native functionality in a really neat way. Simply put: Rbenv is in control of ruby versions at all times. (https://github.com/sstephenson/rbenv#understanding-path) This error might be occurring because of the way the pow symlinking is set up. This would be a rbenv bug though, not a pow bug. @sstephenson, as author of both tools, what's your opinion? |
Just hit this as well after upgrading to OSX Mavericks. Wasted nearly half a day trying to figure it out. 👎 |
What is especially confusing about this issue is running This issue is really confusing as everything you do on the command line works, and everything you do through Pow is broken. Normally the two are in sync and it's possible to reproduce Pow loading problems with |
Bit me too! |
I have the same issue here. After fresh Mavericks install. Then rbenv using homebrew, installed 2.0.0p247. Also installed rbenv-bundler. And set .powconfig in root directory. But pow can't recognise correct ruby version and throw:
|
@regedarek This might be a different issue. If you remove the .ruby-version in the parent directory of your application (or home directory), everything should work well. If the problem is still occurring and you use zsh, check this out: #202 (comment) |
Hi, Thanks a lot. #202 (comment) solved with my issue. |
This tripped me up for a long time! Still an issue in the current version. |
My apps live in ~/Rails/ and each have a .ruby-version. Rails server runs fine. But Pow always wants to load the Ruby specified in the parent dir a.k.a. my home dir: ~/.ruby-version.
When I remove ~/.ruby-version, Pow correctly loads rbenv from the Rails application directory and the correct Ruby. So there's a path lookup going haywire somewhere. The .ruby-version in the application directory should always win, IMO.
Mac OS X 10.8.3 with zsh and Oh-My-Zsh.
The text was updated successfully, but these errors were encountered: