unicode_utils gem 无法安装



我在一个捆绑包安装中遇到了这个错误(这是在我使用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

错误消息中很清楚,我相信其他人也看得很清楚: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'

从终端安装也是一样的。

相关内容

  • 没有找到相关文章

最新更新