Pow not working with Ruby 2.0 using RBENV
Asked Answered
H

2

2

I installed Ruby 2.0.0-p247 via rbenv (ruby-build) and unfortunately my Pow.cx isn't working.

Has anyone had this experience?

I'm getting the following Pow

Error starting application
Your Rack app raised an exception when Pow tried to run it.

~/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
~/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
~/Code/sandwiches_app/config/boot.rb:6:in `<top (required)>'
~/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
~/.rbenv/versions/1.9.3-p429/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'

Any insights is much appreciated. It looks like it's looking at the 1.9.3 version of Ruby but I've set the rbnenv global, shell and local (within the app .ruby-version) to use Ruby 2.0.0-p247. I'm using ZSH and have tried updating homebrew, rbenv and also a coldboot.

Haema answered 17/7, 2013 at 5:19 Comment(0)
H
9

It looks like this is an known issue as per: https://github.com/37signals/pow/issues/363

I had to delete the file .ruby-version in my home directory ~ for it to work.

I hope this helps people who has experienced the same problem.

Haema answered 20/7, 2013 at 11:15 Comment(2)
Thank you! I'd been going in circles trying to change ~/.powconfigLifeline
I use rbenv and for awhile now I could not figure out why my current project .ruby-version was not being picked up by Pow. This worked like a champ, tho it should not have. But thanks!Pascha
D
-1

Ok the above answer does work but for those of you that share a project with others and the option to remove the .ruby-version file is not a possibility....

Add a .powrc file in the root of your project and in that file add this:

if [ -f "$rvm_path/scripts/rvm" ]; then
   source "$rvm_path/scripts/rvm"
   rvm use .
fi
Drescher answered 6/1, 2015 at 22:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.