Question

I am getting the following error each time i try run my app through pow

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

I am just trying to link my project with pow and apparently i have a different version of ruby? i am using rbenv to manage my ruby versions. i have set rbenv to set 2.0.0-p0 locally, if i call ruby -v i get ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.4.0]

$rbenv versions
  system
  1.9.3-p327
* 2.0.0-p0 (set by /Users/fortknokx/Personal work/cave/.rbenv-version)

i tried to 'rbenv rehash' and refresh the '.ruby-version' nothing seems to convince pow that i am using ruby 2.0.0

The full stack on the error that i get from pow is as follows

~/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bundler-
~/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/definition.rb:361:in `validate_ruby!'
~/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:116:in `setup'
~/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>'
~/.rbenv/versions/1.9.3-p327/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
~/.rbenv/versions/1.9.3-p327/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'3.5/lib/bundler/definition.rb:361:in `validate_ruby!'
~/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:116:in `setup'
~/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>'
~/.rbenv/versions/1.9.3-p327/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
~/.rbenv/versions/1.9.3-p327/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'

some how pow thinks i am on 1.9.3-p327?? any one had a simular issue. is it a ruby 2.0.0 thing or is it pow and rbenv having a boxing match?

Was it helpful?

Solution

There are some issues with using pow and rbenv as chronicled here: rbenv does not work well with pow

The problem seems to center on some PATH issues with the powconfig file, hence the reason pow is trying to use your default ruby install (assuming 1.9.x) vs. what you designated via rbenv. If you are using OSX mavericks, add the following to your ~/.powconfig file, restart pow once the change is made, and you should be good to go. (per the last suggestion):

export RBENV_ROOT=/usr/local/var/rbenv # Might not be necessary for pre-Mavericks OSX
eval $(rbenv init -)
export PATH=$(rbenv root)/shims:$(rbenv root)/bin:$PATH
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top