红宝石1.8.7宝石安装,但 - 他们不是?

时间:2011-06-01 23:44:52

标签: ruby-on-rails ruby

我有一个rails 2.3.5应用程序,如果我尝试做rake db:migrate,我得到:

Missing these required gems:
  authlogic  ~> 2.1.3
  will_paginate  ~> 2.3.11
  paperclip  ~> 2.3.1.1
  mimetype-fu  ~> 0.1.2
  nokogiri  

You're running:
  ruby 1.8.7.302 at /usr/local/bin/ruby18
  rubygems 1.8.3 at /home/p/patrick/.gem/ruby/1.8, /usr/local/lib/ruby/gems/1.8

Run `rake gems:install` to install the missing gems.

如果我这样做:

rake gems

我明白了:

    [F] authlogic ~> 2.1.3
    [F] will_paginate ~> 2.3.11
    [F] paperclip ~> 2.3.1.1
    [F] mimetype-fu ~> 0.1.2
    [R] rubyzip ~> 0.9.1
    [F] nokogiri 

    I = Installed
    F = Frozen
    R = Framework (loaded before rails starts)

我的config / environment.rb中包含:

config.gem 'authlogic',     :version => '~> 2.1.3'
config.gem 'will_paginate', :version => '~> 2.3.11',  :source => 'http://gemcutt
config.gem 'paperclip',     :version => '~> 2.3.1.1'
config.gem 'mimetype-fu',   :lib => 'mimetype_fu',    :version => '~> 0.1.2'
config.gem 'rubyzip',       :lib => 'zip/ziprequire', :version => '~> 0.9.1'
config.gem 'nokogiri'

2 个答案:

答案 0 :(得分:1)

config.gem 'authlogic',     :version => '>= 2.1.3'
config.gem 'will_paginate', :version => '>= 2.3.11',  :source => 'http://gemcutt
config.gem 'paperclip',     :version => '>= 2.3.1.1'
config.gem 'mimetype-fu',   :lib => 'mimetype_fu',    :version => '>= 0.1.2'
config.gem 'rubyzip',       :lib => 'zip/ziprequire', :version => '>= 0.9.1'
config.gem 'nokogiri'

我不知道~>的含义,但此版本应该可以正常使用

答案 1 :(得分:1)

我最终在服务器上安装了rvm,所有这些废话都消失了......对于rvm而言!