unicode_utils gem不会安装

时间:2014-10-20 18:40:54

标签: ruby-on-rails ruby unicode ruby-on-rails-3.2 ruby-1.9.2

我在捆绑安装上遇到此错误(这是我使用ruby 1.9.2(我也尝试过1.9.1)和Rails 3.2.11

Installing unicode_utils (1.4.0) /usr/lib/ruby/vendor_ruby/1.8/rubygems/installer.rb:388:in `ensure_required_ruby_version_met': unicode_utils requires Ruby version >= 1.9.1. (Gem::InstallError)
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/installer.rb:156:in `install'
    from /usr/lib/ruby/vendor_ruby/bundler/source.rb:101:in `install'
    from /usr/lib/ruby/vendor_ruby/bundler/rubygems_integration.rb:78:in `preserve_paths'
    from /usr/lib/ruby/vendor_ruby/bundler/source.rb:91:in `install'
    from /usr/lib/ruby/vendor_ruby/bundler/installer.rb:58:in `run'
    from /usr/lib/ruby/vendor_ruby/bundler/rubygems_integration.rb:93:in `with_build_args'
    from /usr/lib/ruby/vendor_ruby/bundler/installer.rb:57:in `run'
    from /usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:12:in `each'
    from /usr/lib/ruby/vendor_ruby/bundler/spec_set.rb:12:in `each'
    from /usr/lib/ruby/vendor_ruby/bundler/installer.rb:49:in `run'
    from /usr/lib/ruby/vendor_ruby/bundler/installer.rb:8:in `install'
    from /usr/lib/ruby/vendor_ruby/bundler/cli.rb:222:in `install'
    from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor/task.rb:22:in `send'
    from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor/task.rb:22:in `run'
    from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:246:in `dispatch'
    from /usr/lib/ruby/vendor_ruby/bundler/vendor/thor/base.rb:389:in `start'
    from /usr/bin/bundle:13

1 个答案:

答案 0 :(得分:0)

在错误消息中很清楚,我确信其他人也非常清楚地看到了它:     Installing unicode_utils (1.4.0) /usr/lib/ruby/vendor_ruby/1.8/rubygems/installer.rb:388:in `ensure_required_ruby_version_met': unicode_utils requires Ruby version >= 1.9.1. (Gem::InstallError)

您正在使用Ruby 1.8的全球版本。 UnicodeUtils适用于Ruby 1.9.1或更高版本

对于RVM:

$ rvm --default use 1.9.2

在你的Gemfile中:

gem 'unicode_utils', '~> 1.4.0'

从终端安装也是如此。