You have already activated rack 1.3.2, but your Ge

2019-03-16 04:59发布

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

2条回答
劫难
2楼-- · 2019-03-16 05:21

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]
查看更多
手持菜刀,她持情操
3楼-- · 2019-03-16 05:36

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.

查看更多
登录 后发表回答