2014-01-07 127 views
0

我收到以下錯誤,當我嘗試運行bundle install捆綁安裝拋出錯誤

Bundler::GemspecError: Could not read gem at /usr/local/rvm/gems/[email protected]/cache/turbolinks-2.1.0.gem. It may be corrupted. 

An error occurred while installing turbolinks (2.1.0), and Bundler cannot continue. 
Make sure that `gem install turbolinks -v '2.1.0'` succeeds before bundling. 

即使在安裝上面說的創業板和擦bundle install它拋出一個類似的錯誤,並問我,以確保一個又一個寶石已安裝,並繼續。 我用Rails 4.0.2和Ruby 1.9.3p484。

+0

嘗試增加'寶石「turbolinks''您_gemfile_,然後使用'束install'。 – Vucko

回答

1

可能是文件緩存中被損壞了。嘗試:

bundle install --no-cache 

如果這不起作用,刪除緩存目錄,然後再試一次:

rm -rf /usr/local/rvm/gems/[email protected]/cache 
bundle install 
+0

嘿火星塞,反饋不會傷害;-) – AWM

1

我只是有這個問題與bcrypt寶石

Fetching gem metadata from https://rubygems.org/........... 
Resolving dependencies... 

Bundler::GemspecError: Could not read gem at /data/code/mdweb/vendor/bundle/ruby/2.1.0/cache/bcrypt-3.1.7.gem. It may be 
corrupted. 
An error occurred while installing bcrypt (3.1.7), and Bundler cannot continue. 
Make sure that `gem install bcrypt -v '3.1.7'` succeeds before bundling. 

/data/code/mdweb/vendor/bundle/ruby/2.1.0/cache/bcrypt-3.1.7.gem文件是0字節;刪除此文件或使用--no-cache選項並沒有幫助。

使用gem install bcrypt -v '3.1.7'工作,所以我複製到~/.gem/ruby/2.1.0/cache/bcrypt-3.1.7.gem/data/code/mdweb/vendor/bundle/ruby/2.1.0/cache/bcrypt-3.1.7.gem,讓我繼續下去。你也可以從獲取的http://rubygems.org文件.gem如果您的系統上找不到它。

我懷疑有某種連接問題與bundler(但由於某種原因不與gem);我懷疑DNS因爲有一個不尋常的漫長等待之前,我得到一個錯誤,但沒有進一步的調查。

+0

哇,是啊,我只是碰到了這一點,並手動下載從rubygems.org的.gem文件並獲得成功(有一個名爲「下載」的邊欄的鏈接)。哇,這是一個糟糕的錯誤... –