0

我想运行一个带有 oauth 演示的程序,它给出了这个错误:

/Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/spec_set.rb:88:in `materialize': Could not find crack-0.1.8 in any of the sources (Bundler::GemNotFound)
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/spec_set.rb:82:in `map!'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/spec_set.rb:82:in `materialize'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/definition.rb:107:in `specs'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/definition.rb:152:in `specs_for'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/definition.rb:141:in `requested_specs'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/environment.rb:23:in `requested_specs'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler/runtime.rb:11:in `setup'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.22/lib/bundler.rb:110:in `setup'
from example.rb:2

我发现运行它需要crack-0.1.8。跑的时候gem list发现我电脑里的破解版是0.3.1,请问怎么解决这个问题呢?(新版和旧版不兼容?我一头雾水。)

4

3 回答 3

0

只需在中指定此 gem 的版本 Gemfile

gem crack, '0.1.8'
于 2012-06-30T17:06:40.630 回答
0

Crack 0.1.8可在 ruby​​gems.org 获得:

gem install crack -v 0.1.8

应该可以安装您需要的版本。

于 2012-07-03T10:12:27.737 回答
0

Run bundle install,它将安装 Gemfile 中指定的所有所需 Gem 的正确版本。之后它应该可以正常运行。

于 2012-06-30T18:00:49.510 回答