2014-02-07 57 views
0

昨天我試圖捆綁安裝spree_i18n(2-1穩定)時出現意外中斷。 現在I'm試圖再次和I'm收到此錯誤:Rails 4.0.2捆綁安裝時出現spree_i18n錯誤

Fetching git://github.com/spree/spree_i18n.git 
remote: Reusing existing pack: 5457, done. 
remote: Counting objects: 1, done. 
remote: Total 5458 (delta 0), reused 0 (delta 0) 
Receiving objects: 100% (5458/5458), 5.43 MiB | 1.12 MiB/s, done. 
Resolving deltas: 100% (2586/2586), done. 
fatal: index file smaller than expected 
Retrying git fetch --force --quiet --tags "/usr/local/rvm/gems/ruby-2.1.0/cache/bundler/git/spree_i18n-9ca2061df39e8ec5a8680e02b37a93a3750bd57c" due to error (2/3): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --tags "/usr/local/rvm/gems/ruby-2.1.0/cache/bundler/git/spree_i18n-9ca2061df39e8ec5a8680e02b37a93a3750bd57c"` in directory /usr/local/rvm/gems/ruby-2.1.0/bundler/gems/spree_i18n-a2c64740cdc7 has failed. 
If this error persists you could try removing the cache directory '/usr/local/rvm/gems/ruby-2.1.0/cache/bundler/git/spree_i18n-9ca2061df39e8ec5a8680e02b37a93a3750bd57c' 
fatal: index file smaller than expected 
Retrying git fetch --force --quiet --tags "/usr/local/rvm/gems/ruby-2.1.0/cache/bundler/git/spree_i18n-9ca2061df39e8ec5a8680e02b37a93a3750bd57c" due to error (3/3): Bundler::Source::Git::GitCommandError Git error: command `git fetch --force --quiet --tags "/usr/local/rvm/gems/ruby-2.1.0/cache/bundler/git/spree_i18n-9ca2061df39e8ec5a8680e02b37a93a3750bd57c"` in directory /usr/local/rvm/gems/ruby-2.1.0/bundler/gems/spree_i18n-a2c64740cdc7 has failed. 
If this error persists you could try removing the cache directory '/usr/local/rvm/gems/ruby-2.1.0/cache/bundler/git/spree_i18n-9ca2061df39e8ec5a8680e02b37a93a3750bd57c' 
fatal: index file smaller than expected 
Git error: command `git fetch --force --quiet --tags 
"/usr/local/rvm/gems/ruby-2.1.0/cache/bundler/git/spree_i18n-9ca2061df39e8ec5a8680e02b37a93a3750bd57c"` in directory 
/usr/local/rvm/gems/ruby-2.1.0/bundler/gems/spree_i18n-a2c64740cdc7 has failed. 
If this error persists you could try removing the cache directory 
'/usr/local/rvm/gems/ruby-2.1.0/cache/bundler/git/spree_i18n-9ca2061df39e8ec5a8680e02b37a93a3750bd57c' 

我試圖消除有關錯誤中指定的目錄,但同樣的結果。

我的Gemfile看起來是這樣的:

source 'https://rubygems.org' 

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' 
gem 'rails', '4.0.2' 

# Use sqlite3 as the database for Active Record 
gem 'sqlite3' 

# Use SCSS for stylesheets 
gem 'sass-rails', '~> 4.0.0' 

# Use Uglifier as compressor for JavaScript assets 
gem 'uglifier', '>= 1.3.0' 

# Use CoffeeScript for .js.coffee assets and views 
gem 'coffee-rails', '~> 4.0.0' 

# See https://github.com/sstephenson/execjs#readme for more supported runtimes 
# gem 'therubyracer', platforms: :ruby 

# Use jquery as the JavaScript library 
#gem 'jquery-rails' 
gem 'jquery-rails', '~> 3.0.0' 

# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks 
gem 'turbolinks' 

# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder 
gem 'jbuilder', '~> 1.2' 

group :doc do 
    # bundle exec rake doc:rails generates the API under doc/api. 
    gem 'sdoc', require: false 
end 

# Use ActiveModel has_secure_password 
# gem 'bcrypt-ruby', '~> 3.1.2' 

# Use unicorn as the app server 
# gem 'unicorn' 

# Use Capistrano for deployment 
# gem 'capistrano', group: :development 

# Use debugger 
# gem 'debugger', group: [:development, :test] 

# Spree 
gem 'spree', github: 'spree/spree', branch: '2-1-stable' 
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '2-1-stable' 
gem 'spree_paypal_express', :github => "radar/better_spree_paypal_express", :branch => "2-1-stable" 
gem 'spree_fancy', :github => "spree/spree_fancy", :branch => "2-1-stable" 
gem 'spree_reviews', github: 'spree/spree_reviews', branch: '2-1-stable' 
gem 'spree_wishlist', :git => 'git://github.com/spree/spree_wishlist.git', :branch => "2-1-stable" 
gem 'spree_email_to_friend', :git => 'git://github.com/spree/spree_email_to_friend.git', :branch => "2-1-stable" 
gem 'deface', github: 'spree/deface' 
gem 'spree_i18n', github: 'spree/spree_i18n', branch: '2-1-stable' 

不知道如何解決這個問題?

回答

0

好的我解決了這個問題。如果有人遇到同樣的問題,我會爲信息編寫解決方法。

我在我的ruby版本的Bundler下進入我的目錄gem,發現爲spree_i18n創建了4個不同的目錄。我只是改變了他們的名字,並嘗試從我的應用程序目錄安裝捆綁軟件。現在一切正常,模塊被添加到包中。

[email protected]:/usr/local/rvm/gems/ruby-2.1.0/bundler/gems$ ll 
total 88 
drwxrwsr-x 22 guillermo rvm 4096 Feb 6 14:08 ./ 
drwxrwsr-x 3 guillermo rvm 4096 Jan 27 18:42 ../ 
drwxrwxr-x 9 guillermo rvm 4096 Feb 8 17:06 better_spree_paypal_express-f385bbe229c9/ 
drwxrwxr-x 7 guillermo rvm 4096 Feb 8 17:06 deface-607524622705/ 
drwxrwxr-x 9 guillermo rvm 4096 Feb 8 17:06 spree_auth_devise-f6f91480655b/ 
drwxrwxr-x 10 guillermo rvm 4096 Feb 8 17:06 spree-b328e2487bfc/ 
drwxrwxr-x 8 guillermo rvm 4096 Feb 8 17:06 spree_email_to_friend-f6483b4d8dba/ 
drwxrwxr-x 10 guillermo rvm 4096 Feb 8 17:06 spree_fancy-d6b6cf03b1f6/ 
drwxrwxr-x 10 guillermo rvm 4096 Jan 30 14:41 spree-ffda7917903a/ 
drwxrwxr-x 9 guillermo rvm 4096 Jan 30 14:41 spree_gateway-04c51e6bd24e/ 
drwxrwxr-x 9 guillermo rvm 4096 Jan 31 09:48 spree_gateway-ab4dcb885418/ 
drwxrwxr-x 10 guillermo rvm 4096 Jan 30 14:09 spree_i18n-2398a7064abe/ 
drwxrwxr-x 10 guillermo rvm 4096 Jan 31 09:48 spree_i18n-7b1061b06199/ 
drwxrwxr-x 10 guillermo rvm 4096 Feb 6 14:08 spree_i18n-a2c64740cdc7/ 
drwxrwxr-x 10 guillermo rvm 4096 Jan 27 20:01 spree_i18n-a5ab8c91b4dd/ 
drwxrwxr-x 9 guillermo rvm 4096 Jan 29 14:48 spree-product-assembly-30c8ea090e4a/ 
drwxrwxr-x 9 guillermo rvm 4096 Jan 31 09:48 spree-product-assembly-586ba3923b64/ 
drwxrwxr-x 9 guillermo rvm 4096 Jan 29 13:27 spree-product-assembly-85cecdfc828d/ 
drwxrwxr-x 10 guillermo rvm 4096 Feb 8 17:06 spree_reviews-30c7518d65e4/ 
drwxrwxr-x 8 guillermo rvm 4096 Jan 31 09:48 spree_static_content-5966c16c9ef1/ 
drwxrwxr-x 8 guillermo rvm 4096 Jan 30 14:05 spree_static_content-6ac885b6f8c2/ 
drwxrwxr-x 8 guillermo rvm 4096 Feb 8 17:06 spree_wishlist-56f1f230b0bc/ 
[email protected]:/usr/local/rvm/gems/ruby-2.1.0/bundler/gems$ mv spree_i18n-2398a7064abe/ spree_i18n-2398a7064abe.bck 
[email protected]:/usr/local/rvm/gems/ruby-2.1.0/bundler/gems$ mv spree_i18n-7b1061b06199/ spree_i18n-7b1061b06199.bck 
[email protected]:/usr/local/rvm/gems/ruby-2.1.0/bundler/gems$ mv spree_i18n-a2c64740cdc7/ spree_i18n-a2c64740cdc7.bck 
[email protected]:/usr/local/rvm/gems/ruby-2.1.0/bundler/gems$ mv spree_i18n-a5ab8c91b4dd/ spree_i18n-a5ab8c91b4dd-bck