I use Pow and powify gem with my rails project.
Now I try to upgrade my ruby version (from 1.9.3 to 2.0.0, I use RVM)
When I switch ruby version, install all gem dependencies, I make sure that app works fine by running
Bundler::RubyVersionMismatch: Your Ruby version is 1.9.3, but your Gemfile specified 2.0.0
Create an file called
.powrc in your projects root directory. Copy and paste the content below to your file.
if [ -f "$rvm_path/scripts/rvm" ]; then source "$rvm_path/scripts/rvm" if [ -f ".rvmrc" ]; then source ".rvmrc" fi if [ -f ".ruby-version" ]; then rvm use `cat .ruby-version` fi if [ -f ".ruby-gemset" ]; then rvm gemset use --create `cat .ruby-gemset` fi fi
This will look to your ruby environment files and select the correct version from it. If this won't work on your first try then make sure you have an
.ruby-version file in your root directory for the project.
And don't forget to
touch tmp/restart.txt to restart your application.