警告:'/ Library/Ruby/Gems/1.8/specifications/rack-1.3.5.gemspec'中的.gemspec格式无效

时间:2011-10-26 00:42:54

标签: ruby gem gemspecs

我正在尝试运行Sinatra应用程序,但由于没有找到机架而导致失败。 我收到以下错误:

WARNING:  Invalid .gemspec format in '/Library/Ruby/Gems/1.8/specifications/rack-1.3.5.gemspec'
/Library/Ruby/Site/1.8/rubygems.rb:636:in `report_activate_error': Could not find RubyGem rack (~> 1.3, >= 1.3.4) (Gem::LoadError)
    from /Library/Ruby/Site/1.8/rubygems.rb:141:in `activate'
    from /Library/Ruby/Site/1.8/rubygems.rb:165:in `activate'
    from /Library/Ruby/Site/1.8/rubygems.rb:164:in `each'
    from /Library/Ruby/Site/1.8/rubygems.rb:164:in `activate'
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:35:in `require'

我正在运行Ruby版本1.8.6

我尝试删除gemspec文件并再次运行gem install。当我安装机架时,它会成功而不会出错。

2 个答案:

答案 0 :(得分:2)

尝试更新您的rubygem软件包

gem update --system

答案 1 :(得分:0)

你试过这个gem update --system吗?