problem with rack 1.3.2. You have already activated rack 1.3.2, but your Gemfile requires rack 1.2.3

夙愿已清 提交于 2019-12-04 10:51:25

Short answer:

you need to run

bundle update rack

This will update your rack version in Gemfile.lock

Longer answer:

This error usually happens when your activated rack/rake version is different from your rails app's rack/rake version. When you run 'bundle install', some critical gems won't get update due to dependency.

That's why you need to run 'bundle update' (for all gems), or 'bundle update a_specific_gem' to update a certain gem like rack/rake in you Gemfile.lock.

What worked for me is this:

  1. Clear your Gemfile.lock
  2. Run bundle install

Problem fixed.

I had this exact issue on Dreamhosters.com with a recent client. I believe what I did was update my Gemfile to specify the version that is already "activated" and then rebuild the Gemfile.lock.

In my case the problem the issue was that rails was finding the system gems before my local gems and couldn't handle the conflict gracefully. It was on 3.0.3 and I didn't have the same issue on my development box where I use rvm and don't have a system ruby/rails installed at all.

I don't know that this will solve your issues but it might at least give you a starting point for further research. I found a lot of links for this by googling the error message.

The 5 whys response to your problem is:

Phusion Passenger is not using your application Bundled gems, but another set of gems.

This may be because many different reasons, but all of them related to your particular system (OS, apache/nginx, ruby, environment variables, ...).

  • Make sure your Gemfile is correct (especially the 'source' lines)
  • know which user is running your Phusion Passenger (usually is the same as your web server)
  • Force a bundle path for that user

    BUNDLE_PATH: /home/xxxxxxx/.bundler to RAILS_ROOT/.bundle/config

  • or even better use bundle deployment option to install gems in vendor/bundle

    bundle install --deployment

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