机架 1.3.2 的问题.你已经激活了 rack 1.3.2,但是你的 Gemfile 需要 rack 1.2.3 [英] problem with rack 1.3.2. You have already activated rack 1.3.2, but your Gemfile requires rack 1.2.3

查看:34
本文介绍了机架 1.3.2 的问题.你已经激活了 rack 1.3.2,但是你的 Gemfile 需要 rack 1.2.3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 debian 上有乘客 3.0.9,gem rack 1.3.2 和 1.2.1.

i have passenger 3.0.9 on debian with gem rack 1.3.2 and 1.2.1.

使用带有乘客 e 捆绑器的 rails 3.0 应用程序,我遇到此错误:

With a rails 3.0 application with passenger e bundler i have this error:

您已经激活了rack 1.3.2,但是您的Gemfile 需要rack 1.2.3.考虑使用 bundle exec.

You have already activated rack 1.3.2, but your Gemfile requires rack 1.2.3. Consider using bundle exec.

使用 rails 3.1 就可以了.我无法使用 rails 3.0 启动应用程序,而只能使用 3.1.

With rails 3.1 is all ok. I can't make start application with rails 3.0 but only with 3.1.

Passnnger 加载第一个 rack 1.3.2,不要在 bundler gems 上加载 rack 1.2.3

Passnnger load first rack 1.3.2 and don't load rack 1.2.3 on gems of bundler

推荐答案

简答:

你需要运行

bundle update rack

这将更新您在 Gemfile.lock 中的机架版本

This will update your rack version in Gemfile.lock

更长的答案:

当您激活的机架/耙版本与您的 rails 应用程序的机架/耙版本不同时,通常会发生此错误.当您运行 'bundle install' 时,一些关键的 gem 将不会因为依赖而得到更新.

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.

这就是为什么你需要运行bundle update"(对于所有 gem),或者bundle update a_specific_gem"来更新你 Gemfile.lock 中的某个 gem,比如 rack/rake.

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.

这篇关于机架 1.3.2 的问题.你已经激活了 rack 1.3.2,但是你的 Gemfile 需要 rack 1.2.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆