Pow not working with Ruby 2.0 using RBENV

邮差的信 提交于 2019-12-12 21:02:42

问题


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.


回答1:


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.




回答2:


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


来源:https://stackoverflow.com/questions/17691695/pow-not-working-with-ruby-2-0-using-rbenv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!