我正在运行:ruby 1.9.2p290(2011-07-09修订版32553)[x86_64-darwin10.8.0]
Nokogiri对我有分歧,我认为这个问题已经解决了:
https://github.com/ender672/nokogiri
但是,如果我这样做:
gem 'nokogiri', :git => 'git://github.com/ender672/nokogiri.git'
我获得了成功的捆绑安装,捆绑包甚至捆绑更新以生成新的Gemfile。但是,我甚至无法进入控制台:
git://github.com/ender672/nokogiri.git (at master) is not checked out. Please run `bundle install`
rvm刚刚将我的1.9.2更新为p290,我认为这可能会导致问题。也许我应该回到最后一个稳定版本。我会对如何做到感兴趣,但我不知道以前的内部版本号。
的Gemfile
source 'http://rubygems.org' gem 'simplecov', '>= 0.4.0', :require => false, :group => :test gem 'httparty' gem "rails", "3.1.0.rc5" # Rails 3.1 - Asset Pipeline group :assets do gem 'sass-rails', "~> 3.1.0.rc" gem 'coffee-script' gem 'uglifier' gem 'json' gem 'jquery-rails' gem 'therubyracer' gem 'execjs' gem 'sprockets', '~> 2.0.0.beta.12' end # Bundle gems needed for Mongoid gem "mongoid", "~>2.0.1" #, "2.0.0.rc.7" gem "bson_ext" #, "1.1.5" gem 'rake', '0.8.7' # Bundle gem needed for Devise and cancan gem "devise", "~>1.4.0" # ,"1.1.7" gem "cancan" #gem "omniauth", :git => 'git://github.com/intridea/omniauth.git' # maybe we need this latest version instead of the gem -tbb #gem "govkit" #, :git => 'git://github.com/tbbooher/govkit.git' #gem "nytimes-congress" #gem "geokit" #gem 'drumbone' gem "googlecharts" #gem "omniauth" "0.2.6" #gem 'omniauth', '>= 0.2.6' gem 'omniauth', :git => 'git://github.com/intridea/omniauth.git' # we need some stuff too (tbb) gem "formtastic" # for installation #gem "heroku" # for deployment gem "capistrano" # and server gem 'unicorn' # time to connect to opencongress gem 'json' #gem 'ym4r' gem 'geocoder' #group :after_initialize do gem 'nokogiri' #, :git => 'git://github.com/ender672/nokogiri.git'# :git => 'git://github.com/tenderlove/nokogiri.git' gem "feedzirra" #ls #, :git => "git://github.com/pauldix/feedzirra.git" #end gem 'sax-machine' # Bundle gem needed for paperclip and attachments gem "mongoid-paperclip", :require => "mongoid_paperclip" # MongoID Extensions and extras gem 'mongoid-tree', :require => 'mongoid/tree' # Bundle gems for views gem "haml" gem "will_paginate" gem 'escape_utils' gem "RedCloth", "4.2.5" # Markdown # do "easy_install pygments" on your system gem 'redcarpet' gem 'albino' #gem "nokogiri", "1.4.6" # maybe we need rack here # Bundle gems for development group :development do gem "nifty-generators" gem "rails-erd" gem 'rdoc' gem "rails3-generators" gem "ruby-debug19" gem 'unicorn' gem 'yard' #broken in OS X 10.7 see how to workarround this issue end # Bundle gems for testing group :test do #gem 'webmock' #gem 'vcr' gem 'faker' gem 'json_pure' gem 'capybara' gem 'database_cleaner' gem 'cucumber-rails' gem 'cucumber' gem 'rspec', '2.6.0' gem 'rspec-rails', '2.6.1' gem 'spork', '0.9.0.rc9' gem 'spork-testunit' gem 'launchy' gem 'factory_girl' gem 'factory_girl_rails' gem 'ZenTest' gem 'autotest' gem 'autotest-rails' gem 'ruby-growl' gem 'autotest-growl' gem "mocha" gem "fabrication" gem "gherkin" gem 'test-unit' gem "autotest-fsevent" end
Gemfile.lock的
GIT remote: git://github.com/intridea/omniauth.git revision: 26fb41d840a9f50da1d3ab4c778ef5a20581808b specs: oa-basic (0.3.0.rc1) oa-core (= 0.3.0.rc1) rest-client (~> 1.6.0) oa-core (0.3.0.rc1) oa-enterprise (0.3.0.rc1) addressable (~> 2.2.6) net-ldap (~> 0.2.2) nokogiri (~> 1.5.0) oa-core (= 0.3.0.rc1) pyu-ruby-sasl (~> 0.0.3.1) rubyntlm (~> 0.1.1) oa-more (0.3.0.rc1) multi_json (~> 1.0.0) oa-core (= 0.3.0.rc1) rest-client (~> 1.6.0) oa-oauth (0.3.0.rc1) faraday (~> 0.7.3) multi_json (~> 1.0.0) multi_xml (~> 0.2.2) oa-core (= 0.3.0.rc1) oauth (~> 0.4.0) oauth2 (~> 0.5.0) oa-openid (0.3.0.rc1) oa-core (= 0.3.0.rc1) rack-openid (~> 1.3.1) ruby-openid-apps-discovery (~> 1.2.0) omniauth (0.3.0.rc1) oa-basic (= 0.3.0.rc1) oa-core (= 0.3.0.rc1) oa-enterprise (= 0.3.0.rc1) oa-more (= 0.3.0.rc1) oa-oauth (= 0.3.0.rc1) oa-openid (= 0.3.0.rc1) GEM remote: http://rubygems.org/ specs: RedCloth (4.2.5) ZenTest (4.6.0) actionmailer (3.1.0.rc5) actionpack (= 3.1.0.rc5) mail (~> 2.3.0) actionpack (3.1.0.rc5) activemodel (= 3.1.0.rc5) activesupport (= 3.1.0.rc5) builder (~> 3.0.0) erubis (~> 2.7.0) i18n (~> 0.6) rack (~> 1.3.1) rack-cache (~> 1.0.2) rack-mount (~> 0.8.1) rack-test (~> 0.6.0) sprockets (~> 2.0.0.beta.12) activemodel (3.1.0.rc5) activesupport (= 3.1.0.rc5) bcrypt-ruby (~> 2.1.4) builder (~> 3.0.0) i18n (~> 0.6) activerecord (3.1.0.rc5) activemodel (= 3.1.0.rc5) activesupport (= 3.1.0.rc5) arel (~> 2.1.4) tzinfo (~> 0.3.29) activeresource (3.1.0.rc5) activemodel (= 3.1.0.rc5) activesupport (= 3.1.0.rc5) activesupport (3.1.0.rc5) multi_json (~> 1.0) addressable (2.2.6) albino (1.3.3) posix-spawn (>= 0.3.6) archive-tar-minitar (0.5.2) arel (2.1.4) autotest (4.4.6) ZenTest (>= 4.4.1) autotest-fsevent (0.2.5) sys-uname autotest-growl (0.2.9) autotest-rails (4.1.0) ZenTest bcrypt-ruby (2.1.4) bson (1.3.1) bson_ext (1.3.1) builder (3.0.0) cancan (1.6.5) capistrano (2.8.0) highline net-scp (>= 1.0.0) net-sftp (>= 2.0.0) net-ssh (>= 2.0.14) net-ssh-gateway (>= 1.1.0) capybara (1.0.0) mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) selenium-webdriver (~> 0.2.0) xpath (~> 0.1.4) childprocess (0.2.0) ffi (~> 1.0.6) cocaine (0.1.0) coffee-script (2.2.0) coffee-script-source execjs coffee-script-source (1.1.2) columnize (0.3.4) crack (0.1.8) cucumber (1.0.2) builder (>= 2.1.2) diff-lcs (>= 1.1.2) gherkin (~> 2.4.5) json (>= 1.4.6) term-ansicolor (>= 1.0.5) cucumber-rails (1.0.2) capybara (>= 1.0.0) cucumber (~> 1.0.0) nokogiri (>= 1.4.6) curb (0.7.15) database_cleaner (0.6.7) devise (1.4.2) bcrypt-ruby (~> 2.1.2) orm_adapter (~> 0.0.3) warden (~> 1.0.3) diff-lcs (1.1.2) erubis (2.7.0) escape_utils (0.2.3) execjs (1.2.4) multi_json (~> 1.0) fabrication (1.0.1) factory_girl (2.0.3) factory_girl_rails (1.1.0) factory_girl (~> 2.0.0) railties (>= 3.0.0) faker (0.9.5) i18n (~> 0.4) faraday (0.7.4) addressable (~> 2.2.6) multipart-post (~> 1.1.0) rack (= 1.1.0) feedzirra (0.0.24) activesupport (>= 2.3.8) builder (>= 2.1.2) curb (>= 0.2.3) loofah (>= 0.3.1) nokogiri (> 0.0.0) sax-machine (>= 0.0.12) ffi (1.0.9) formtastic (1.2.4) actionpack (>= 2.3.7) activesupport (>= 2.3.7) i18n (~> 0.4) geocoder (1.0.2) gherkin (2.4.5) json (>= 1.4.6) googlecharts (1.6.7) haml (3.1.2) highline (1.6.2) hike (1.2.0) httparty (0.7.8) crack (= 0.1.8) i18n (0.6.0) jquery-rails (1.0.12) railties (~> 3.0) thor (~> 0.14) json (1.5.3) json_pure (1.5.3) kgio (2.6.0) launchy (2.0.5) addressable (~> 2.2.6) libv8 (3.3.10.2) linecache19 (0.5.12) ruby_core_source (>= 0.1.4) loofah (1.0.0) nokogiri (>= 1.3.3) mail (2.3.0) i18n (>= 0.4.0) mime-types (~> 1.16) treetop (~> 1.4.8) mime-types (1.16) mocha (0.9.12) mongo (1.3.1) bson (>= 1.3.1) mongoid (2.0.2) activemodel (~> 3.0) mongo (~> 1.3) tzinfo (~> 0.3.22) mongoid-paperclip (0.0.5) paperclip (~> 2.3.6) mongoid-tree (0.6.1) mongoid (~> 2.0) multi_json (1.0.3) multi_xml (0.2.2) multipart-post (1.1.3) net-ldap (0.2.2) net-scp (1.0.4) net-ssh (>= 1.99.1) net-sftp (2.0.5) net-ssh (>= 2.0.9) net-ssh (2.1.4) net-ssh-gateway (1.1.0) net-ssh (>= 1.99.1) nifty-generators (0.4.6) nokogiri (1.5.0) oauth (0.4.5) oauth2 (0.5.0) faraday (= 0.6.1) multi_json (~> 1.0.0) orm_adapter (0.0.5) paperclip (2.3.16) activerecord (>= 2.3.0) activesupport (>= 2.3.2) cocaine (>= 0.0.2) mime-types polyglot (0.3.2) posix-spawn (0.3.6) pyu-ruby-sasl (0.0.3.3) rack (1.3.2) rack-cache (1.0.2) rack (>= 0.4) rack-mount (0.8.1) rack (>= 1.0.0) rack-openid (1.3.1) rack (>= 1.1.0) ruby-openid (>= 2.1.8) rack-ssl (1.3.2) rack rack-test (0.6.1) rack (>= 1.0) rails (3.1.0.rc5) actionmailer (= 3.1.0.rc5) actionpack (= 3.1.0.rc5) activerecord (= 3.1.0.rc5) activeresource (= 3.1.0.rc5) activesupport (= 3.1.0.rc5) bundler (~> 1.0) railties (= 3.1.0.rc5) rails-erd (0.4.5) activerecord (~> 3.0) activesupport (~> 3.0) ruby-graphviz (~> 0.9.18) rails3-generators (0.17.4) railties (>= 3.0.0) railties (3.1.0.rc5) actionpack (= 3.1.0.rc5) activesupport (= 3.1.0.rc5) rack-ssl (~> 1.3.2) rake (>= 0.8.7) rdoc (~> 3.4) thor (~> 0.14.6) raindrops (0.7.0) rake (0.8.7) rdoc (3.9.1) redcarpet (1.17.2) rest-client (1.6.3) mime-types (>= 1.16) rspec (2.6.0) rspec-core (~> 2.6.0) rspec-expectations (~> 2.6.0) rspec-mocks (~> 2.6.0) rspec-core (2.6.4) rspec-expectations (2.6.0) diff-lcs (~> 1.1.2) rspec-mocks (2.6.0) rspec-rails (2.6.1) actionpack (~> 3.0) activesupport (~> 3.0) railties (~> 3.0) rspec (~> 2.6.0) ruby-debug-base19 (0.11.25) columnize (>= 0.3.1) linecache19 (>= 0.5.11) ruby_core_source (>= 0.1.4) ruby-debug19 (0.11.6) columnize (>= 0.3.1) linecache19 (>= 0.5.11) ruby-debug-base19 (>= 0.11.19) ruby-graphviz (0.9.21) ruby-growl (3.0) ruby-openid (2.1.8) ruby-openid-apps-discovery (1.2.0) ruby-openid (>= 2.1.7) ruby_core_source (0.1.5) archive-tar-minitar (>= 0.5.2) rubyntlm (0.1.1) rubyzip (0.9.4) sass (3.1.7) sass-rails (3.1.0.rc.5) actionpack (~> 3.1.0.rc1) railties (~> 3.1.0.rc1) sass (>= 3.1.4) sprockets (>= 2.0.0.beta.9) sax-machine (0.0.20) nokogiri (> 0.0.0) selenium-webdriver (0.2.2) childprocess (>= 0.1.9) ffi (>= 1.0.7) json_pure rubyzip simplecov (0.4.2) simplecov-html (~> 0.4.4) simplecov-html (0.4.5) spork (0.9.0.rc9) spork-testunit (0.0.5) spork (>= 0.6.0) sprockets (2.0.0.beta.13) hike (~> 1.2) rack (~> 1.0) tilt (!= 1.3.0, ~> 1.1) sys-uname (0.8.5) term-ansicolor (1.0.6) test-unit (2.3.1) therubyracer (0.9.2) libv8 (~> 3.3.10) thor (0.14.6) tilt (1.3.2) treetop (1.4.10) polyglot polyglot (>= 0.3.1) tzinfo (0.3.29) uglifier (1.0.0) execjs (>= 0.3.0) multi_json (>= 1.0.2) unicorn (4.0.1) kgio (~> 2.4) rack raindrops (~> 0.6) warden (1.0.5) rack (>= 1.0) will_paginate (2.3.15) xpath (0.1.4) nokogiri (~> 1.3) yard (0.7.2) PLATFORMS ruby DEPENDENCIES RedCloth (= 4.2.5) ZenTest albino autotest autotest-fsevent autotest-growl autotest-rails bson_ext cancan capistrano capybara coffee-script cucumber cucumber-rails database_cleaner devise (~> 1.4.0) escape_utils execjs fabrication factory_girl factory_girl_rails faker feedzirra formtastic geocoder gherkin googlecharts haml httparty jquery-rails json json_pure launchy mocha mongoid (~> 2.0.1) mongoid-paperclip mongoid-tree nifty-generators nokogiri omniauth! rails (= 3.1.0.rc5) rails-erd rails3-generators rake (= 0.8.7) rdoc redcarpet rspec (= 2.6.0) rspec-rails (= 2.6.1) ruby-debug19 ruby-growl sass-rails (~> 3.1.0.rc) sax-machine simplecov (>= 0.4.0) spork (= 0.9.0.rc9) spork-testunit sprockets (~> 2.0.0.beta.12) test-unit therubyracer uglifier unicorn will_paginate yard
答案 0 :(得分:1)
似乎github上的gem源代码不包含.gemspec文件,在我的情况下我甚至无法安装它
source 'http://rubygems.org'
gem 'nokogiri', :git => 'git://github.com/ender672/nokogiri.git'
运行:捆绑安装,失败并带
Could not find gem 'nokogiri (>= 0, runtime)' in git://github.com/ender672/nokogiri.git (at master).
Source does not contain any versions of 'nokogiri (>= 0, runtime)'
进行了谷歌搜索并找到了这个 - https://github.com/tenderlove/nokogiri/issues/274
但由于这不是来自tenderlove git repo,我认为这不会起作用
查看bundler主页
If there is no .gemspec at the root of a git repository, you must specify a version that bundler should use when resolving dependencies
在gem文件中使用它我至少能够安装它,注意“1.5”添加
source 'http://rubygems.org'
gem 'nokogiri', "1.5", :git => 'git://github.com/ender672/nokogiri.git'
我无法声称这会解决您的问题,但我认为您的应用正在使用仍然存在问题的“官方”1.5版本,我不认为您正在执行ender672 git repo的代码?它们都被标记为1.5
Gemfile.lock的内容
GIT
remote: git://github.com/ender672/nokogiri.git
revision: 953e9b3b1ecf240c83c544f185461c7b86d387d5
specs:
nokogiri (1.5)
GEM
remote: http://rubygems.org/
specs:
PLATFORMS
ruby
DEPENDENCIES
nokogiri (= 1.5)!
我没有在你的Gemfile.lock中看到remote:git://github.com/ender672/nokogiri.git,所以假设它没有真正安装
希望这会有所帮助