简体   繁体   中英

bundler install getting “i18n requires Ruby version >= 1.9.3”

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

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

Command Line

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 File

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'

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'

and try to run bundle install again.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM