让Rails 2.3.x忽略i18n gem [英] Have Rails 2.3.x ignore the i18n gem

查看:72
本文介绍了让Rails 2.3.x忽略i18n gem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Rails本地化功能的Rails 2.3.5项目.我也碰巧安装了Rails 3 beta(取决于i18n gem). Rails 2.3.5会很乐意独自处理本地化(未安装i18n),但是如果i18n gem可用,它将使用它.

I have a Rails 2.3.5 project that uses the localization features of Rails. I also happen to have Rails 3 beta installed (which depends on the i18n gem). Rails 2.3.5 will happily handle localization on it's own (without i18n installed), however if the i18n gem is available, it makes use of it.

最近我升级了我的宝石,现在安装了i18n的0.3.7和0.4.0版本.当然,Rails希望加载并使用导致我的项目出错的最新版本.我尝试将gem版本设置为0.3.7,这可以解决Web应用程序中的错误.但是,我们正在使用resque和resque_mailer来延迟消息的发送.当工作人员从队列中提取邮件作业时,它将忽略我在environment.rb中的config.gem要求,并且始终使用版本0.4.0.

Recently I upgraded my gems and now have version 0.3.7 and 0.4.0 of i18n installed. Rails, of course, wants to load and use the latest version which is causing errors in my project. I tried setting the gem version to 0.3.7 which gets around the errors in the web app. However, we're using resque and resque_mailer to delay the sending of messages. When the worker picks up the mailer job from the queue, it ignores my config.gem requirement in environment.rb and uses version 0.4.0 anyway.

理想情况下,我想告诉Rails根本不使用i18n gem.我该怎么办?

Ideally, I'd like to tell Rails to just not use the i18n gem at all. How do I do that?

更新:从beta 4开始,Rails 3现在需要i18​​n版本0.4.1.我看不到有更多的人不会遇到这个问题,因为如果同时安装了Rails 2和Rails 3,现在看来,就会遇到这个问题.

Update: As of beta 4, Rails 3 now requires i18n version 0.4.1. I don't see how more people aren't running into this problem as it would seem now if you have both Rails 2 and Rails 3 installed, you're going to run into this.

推荐答案

我按照此处定义的说明进行操作:

I followed instructions as defined here:

http://gembundler.com/rails23.html

它奏效了.

这篇关于让Rails 2.3.x忽略i18n gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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