问题
I've got a problem while i try to run my app :
You have already activated rack 1.3.2, but your Gemfile requires rack 1.2.3. Consider using bundle exec.
I read a lot about this kind of error, but i did not find any solution that worked for me
- I already removed my Gemfile.lock and re-run bundle as suggested here
- I already use the latest version of passenger (3.0.8) - as suggested here
- The
bundle exec rake
trick cannot be used in my case
Thank you per advance
回答1:
Run bundle install --binstubs
and you'll get bin directory in your application root with all executables needed by app.
Then you need to add this dir to path and best place to do it - .rvmrc if you use RVM.
[ -d './bin' ] && export PATH=`pwd`/bin:$PATH
or just run ./bin/{rake|rails|etc} from your app root.
回答2:
Try prefixing the command to run your server with bundle exec, i.e.
bundle exec rails server
Or in production (if you're using something like Unicorn
bundle exec unicorn [options]
来源:https://stackoverflow.com/questions/7243624/you-have-already-activated-rack-1-3-2-but-your-gemfile-requires-rack-1-2-3-con