简体   繁体   English

Ruby On Rails — 安装基于 git 的 gem 'not ckecked' 问题

[英]Ruby On Rails — installing git-based gems 'not ckecked out' problem

Having a problem with git-based gems.基于 git 的 gem 有问题。
gem file contents:宝石文件内容:
... ...
gem 'spree', :git => 'git://github.com/spree/spree.git', :branch => '0-60-stable' gem 'spree', :git => 'git://github.com/spree/spree.git', :branch => '0-60-stable'
... ...
then 'bundle install' and it installs the gem然后'捆绑安装'并安装gem
but after I make 'bundle check' I get this error:但是在我进行“捆绑检查”之后,我收到了这个错误:
'git://github.com/spree/spree.git (at master) is not checked out. 'git://github.com/spree/spree.git(在主人)未检出。 Please run bundle install'请运行捆绑安装'
I have this error for ANY gem with git source.对于任何带有 git 源的 gem,我都有这个错误。 Gem is 100% working and has been tested on other machines. Gem 100% 正常工作,并且已经在其他机器上进行了测试。

any ideas?有任何想法吗?
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]; ruby 1.8.7(2009-06-12 补丁级别 174)[通用-darwin10.0];
ruby -Rails 3.0.7; ruby -Rails 3.0.7;
Bundler version 1.1.pre.4;捆绑器版本 1.1.pre.4;
Mac OS X 10.6.6 Mac OS X 10.6.6

Tried to reinstall ruby and rails from a scratch using this document http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard/尝试使用此文档http://hivelogic.com/articles/compiling-ruby-rubygems-and-rails-on-snow-leopard/从头开始重新安装 ruby 和导轨

Also tried with rvm using ruby 1.8.7 and 1.9.2 and different bundler versions.还尝试使用 rvm 使用 ruby 1.8.7 和 1.9.2 以及不同的捆绑器版本。 Always get the same error.总是得到同样的错误。

The problem was with the mysql2 gem listed in the Gemfile, it didn't want to install correctly and caused further errors with all other gems.问题出在 Gemfile 中列出的 mysql2 gem,它不想正确安装并导致所有其他 gem 出现进一步的错误。 After removing mysql2 from the Gemfile everything worked well.从 Gemfile 中删除 mysql2 后,一切正常。

You need to pass a valid url through the git parameter so您需要通过 git 参数传递一个有效的 url 所以

gem 'spree', :git => 'git://github.com/spree/spree.git', :branch => '0-60-stable'

is erroring out because it doesn't recognize git as a valid protocol try:出错是因为它无法将 git 识别为有效协议尝试:

gem 'spree', :git => 'http://github.com/spree/spree.git', :branch => '0-60-stable'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM