Pow not working with Ruby 2.0 using RBENV

2019-07-07 15:35发布

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.

2条回答
Anthone
2楼-- · 2019-07-07 16:20

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
查看更多
你好瞎i
3楼-- · 2019-07-07 16:21

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.

查看更多
登录 后发表回答