我有一个可以在本地正常工作的 gem 文件。在我的 gem 文件中,我的一个 gem 使用这样的 github 位置安装...
gem 'rails3-jquery-autocomplete', :git => 'https://github.com/willfults/rails3-jquery-autocomplete.git'
问题是当我在我的开发箱中运行 ssh 并运行 bundle 或 bundle install 时,我的服务器上出现以下错误...
Fetching gem metadata from https://rubygems.org/..
Fetching https://github.com/willfults/rails3-jquery-autocomplete.git
fatal: failed to open '/srv/www/socialu.com/https://github.com/willfults/rails3-jquery-autocomplete.git/objects': No such file or directory
Git error: command `git clone 'https://github.com/willfults/rails3-jquery-autocomplete.git' "/srv/www/socialu.com/https:/github.com/willfults/rails3-jquery-autocomplete.git/ruby/1.9.1/cache/bundler/git/rails3-jquery-autocomplete-186d8dd59401e0d4dd8c2860261d9ba55e0793f2" --bare --no-hardlinks` in directory /srv/www/socialu.com has failed.
我该如何解决?谢谢。
更新:使用 git url 我得到以下内容......
获取 git://github.com/willfults/rails3-jquery-autocomplete.git 远程:计数对象:1846,完成。远程:压缩对象:100% (784/784),完成。远程:总计 1846(增量 1072),重复使用 1688(增量 957) 接收对象:100%(1846/1846),481.07 KiB | 764 KiB/s,完成。解决增量:100% (1072/1072),完成。ssh:无法解析主机名/srv/www/socialu.com/https:名称或服务未知致命:远程端意外挂断Git错误:
git clone --no-checkout "/srv/www/socialu.com/https:/github.com/willfults/rails3-jquery-autocomplete.git/ruby/1.9.1/cache/bundler/git/rails3-jquery-autocomplete-6e048304dc5207eafc457581b1fa2d0073d2e1ed" "/srv/www/socialu.com/https:/github.com/willfults/rails3-jquery-autocomplete.git/ruby/1.9.1/bundler/gems/rails3-jquery-autocomplete-060f2bea5e46"
目录/srv/www/socialu.com中的命令失败。如果此错误仍然存在,您可以尝试删除缓存目录 '/srv/www/socialu.com/https:/github.com/willfults/rails3-jquery-autocomplete.git/ruby/1.9.1/cache/bundler/git/ rails3-jquery-autocomplete-6e048304dc5207eafc457581b1fa2d0073d2e1ed'