在Rails 2.2.2和Ruby 1.8.7中安装gem

时间:2016-07-11 17:00:58

标签: ruby-on-rails ruby

我的公司使用旧的应用程序。我在安装宝石时遇到了麻烦。我试图安装activemerchant v 1.9.2。我得到的错误是

ERROR:  Error installing activemerchant:
i18n requires Ruby version >= 1.9.3.

我发现我需要i18​​n v 0.6.11。所以我安装了它。但是当我再次尝试安装activemerchant时,我得到了同样的错误。有没有办法让它识别i18n v0.6.11?

没有Gemfile,但我的script文件夹中有这个文件(名为utils)。我用script/utils install_gems

运行它
def install_gems
  system('rvm rubygems 1.3.7')
  system('gem source -a http://gems.github.com')
  { 'rails'                       => '2.2.2',
    'activemerchant'              => '1.9.2',
    'authlogic'                   => '1.3.9',
    'business_time'               => '0.3.1',
    'capistrano'                  => '2.6.0',
    'capistrano-ext'              => '1.2.1',
    'chronic'                     => '0.6.7',
    'cloudfiles'                  => '1.5.0.1',
    'crack'                       => '0.1.8',
    'currencies'                  => '0.4.0',
    'cwninja-inaction_mailer'     => '0.6',
    'datanoise-actionwebservice'  => '2.2.2',
    'echoe'                       => '3.0.2',
    'factory_girl'                => '1.2.4',
    'faker'                       => '0.3.1',
    'fastercsv'                   => '1.5.4',
    'fedex'                       => '0.0.1',
    'GData'                       => '0.0.4',
    'gibberish'                   => '1.2.1',
    'googlecharts'                => '1.5.4',
    'highline'                    => '1.5.2',
    'hoe'                         => '1.12.2',
    'holidays'                    => '1.0.5',
    'hpricot'                     => '0.8.4',
    'htmlentities'                => '4.3.1',
    'httparty'                    => '0.7.4',
    'httpclient'                  => '2.2.0.2',
    'icalendar'                   => '1.3.0',
    'javan-whenever'              => '0.3.7',
    'liquid'                      => '2.4.1',
    'mocha'                       => '0.9.5',
    'mysql'                       => '2.8.1',
    'net-ssh'                     => '2.0.22',
    'newrelic_rpm'                => '3.0.0',
    'nokogiri'                    => '1.5.0',
    'parseexcel'                  => '0.5.2',
    'prawn'                       => '0.5.0.1',
    'prawn-core'                  => '0.5.0.1',
    'prawn-layout'                => '0.2.0.1',
    'pry'                         => '0.9.9.6',
    'rake'                        => '0.8.7',
    'roo'                         => '0.9.4',
    'rspec'                       => '1.2.2',
    'rspec-rails'                 => '1.2.2',
    'rubaidh-google_analytics'    => '1.1.4',
    'rubyist-aasm'                => '2.0.5',
    'rubyzip'                     => '0.9.1',
    'savon'                       => '0.7.8',
    'serviceproxy'                => '0.2.1',
    'settingslogic'               => '2.0.3',
    'slop'                        => '1.9.1',
    'soap4r'                      => '1.5.8',
    'spreadsheet'                 => '0.7.3',
    'spreadsheet-excel'           => '0.3.5.1',
    "table_print"                 => "1.0.0",
    'thin'                        => '1.4.1',
    'thoughtbot-paperclip'        => '2.2.7',
    'thoughtbot-shoulda'          => '2.9.1',
    'will_paginate'               => '2.2.2',
    'haml'                        => '3.1.8'
  }.each do |name, version|
    system('gem install %s -v %s --no-ri --no-rdoc' % [name, version])
  end
end

0 个答案:

没有答案