捆绑程序安装获取“ i18n要求Ruby版本> = 1.9.3” [英] bundler install getting "i18n requires Ruby version >= 1.9.3"

查看:77
本文介绍了捆绑程序安装获取“ i18n要求Ruby版本> = 1.9.3”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我运行捆绑安装时,如何纠正此 i18n需要Ruby版本> = 1.9.3?

How can I correct this "i18n requires Ruby version >= 1.9.3" I get when I run "bundler install"?

背景:需要使用ruby 1.8.7在dreamhost上,因此为此目标是Rails v3.2。

Background: Need to use ruby 1.8.7 on dreamhost, so have targeted Rails v3.2 for this.

命令行

Gregs-MacBook-Pro:weekends Greg$ ruby -v
ruby 1.8.7 (2013-12-22 patchlevel 375) [i686-darwin14.1.0]

Gregs-MacBook-Pro:weekends Greg$ bundler -v
Bundler version 1.9.2

Gregs-MacBook-Pro:weekends Greg$ bundler install
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies............
Using rake 10.4.2
Gem::InstallError: i18n requires Ruby version >= 1.9.3.
An error occurred while installing i18n (0.7.0), and Bundler cannot continue.
Make sure that `gem install i18n -v '0.7.0'` succeeds before bundling.
Gregs-MacBook-Pro:weekends Greg$ 

Gregs-MacBook-Pro:weekends Greg$ gem install i18n -v '0.7.0'
ERROR:  Error installing i18n:
    i18n requires Ruby version >= 1.9.3.

宝石文件

gem 'rails', '3.2' # Dreamhost is Ruby 1.8.7. Rails 3.2 requires at least Ruby 1.8.7
gem 'sqlite3'
gem 'haml'
gem 'haml-rails'
gem 'omniauth-google-oauth2'
gem 'google-api-client', :require => 'google/api_client'
gem 'jquery-rails'
gem 'figaro'
gem 'rest-client'


推荐答案

您可以尝试将I18n的版本降级为 0.6.11 ,因为这似乎是不需要Ruby 1.9.3的最新版本。为此,请将其添加到您的Gemfile

You could try to downgrade I18n's version to 0.6.11, because that seems to be the latest version that does not require Ruby 1.9.3. To do so add this to your Gemfile

gem 'i18n', '0.6.11'

并尝试再次运行捆绑安装

此外,我建议升级您的Ruby和Rails版本。他们俩都过时了。至少您可以尝试使用支持新语法的Ruby版本运行Rails 3.2。否则,您还将面临许多其他gem的此类问题,而且-更重要的是-您将无法安装最近几年发布的所有安全修复程序。

Furthermore, I suggest upgrading your Ruby and Rails versions. They are both outdated. At least you could try to run Rails 3.2 with a version of Ruby that allows the new syntax. Otherwise, you will face this kind of problems with many other gems too and - more important - you will not be able to install all the security fixes there were released during the last years.

这篇关于捆绑程序安装获取“ i18n要求Ruby版本> = 1.9.3”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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