![](/img/trans.png)
[英]“Invalid gemspec” messages during “bundle install” of factory girl (rails 3.1 and ruby 1.9.2p290)
[英]bundle install gemspec error spree_social.gemspec
在我的應用程序運行bundle install
,我收到以下錯誤。
vendor / gems / spree_social / spree_social.gemspec無效。 請修復此gemspec。 驗證錯誤是'spree_social-3.1.0.beta包含自己(spree_social-3.1.0.beta.gem),檢查你的文件列表'
我嘗試了刪除Gemlock
和更新寶石等所有內容。 它沒用。
下面是我的Gemfile
source 'https://rubygems.org'
ruby '2.3.0'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5'
# Use sqlite3 as the database for Active Record
gem 'font-awesome-sass', '~> 4.5.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'roo-xls'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# 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', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'aws-sdk', '< 2.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
gem 'paperclip'
# Use Unicorn as the app server
# gem 'unicorn'
gem 'rails_12factor', group: :production
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
gem 'sqlite3'
end
group :production do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'pg'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'web-console', '~> 2.0'
gem 'spree_scaffold', github: 'freego/spree_scaffold'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
end
gem 'spree', '3.0.5'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '3-0-stable'
gem 'spree_wishlist' , :path => File.join(File.dirname(__FILE__), '/vendor/gems/spree_wishlist-2.2.0')
gem 'spree_social', :path => File.join(File.dirname(__FILE__), '/vendor/gems/spree_social')
gem 'spree_gift_card', :path => File.join(File.dirname(__FILE__), '/vendor/gems/spree_gift_card')
gem 'stringex'
gem 'spree_reviews', :path => File.join(File.dirname(__FILE__), '/vendor/gems/spree_reviews')
gem 'spree_auth_devise', :path => File.join(File.dirname(__FILE__), '/vendor/gems/spree_auth_devise-3.0.6')
gem 'spree_mail_settings', :path => File.join(File.dirname(__FILE__), '/vendor/gems/spree_mail_settings')
gem 'spree_mail_settings', github: 'spree-contrib/spree_mail_settings', branch: 'master'
其他人面對這個?
謝謝
這很可能是因為您編譯的.gem文件包含在存儲庫中。 我認為這是因為gem正在嘗試將spree_social-3.1.0.beta.gem
文件打包在其自身內部,並且它不喜歡這樣。 嘗試從存儲庫中刪除.gem文件並重新運行bundle install。
我願意打賭File.join(File.dirname(__FILE__), '/vendor/gems/spree_social'
指向一個git存儲庫,每次嘗試運行時, bundle install
都會編譯並安裝gem。我的理解當以這種方式編譯gem時,它會在git存儲庫上運行git ls-files -z`.split("\\x0")
以獲取要放入gem中的文件列表。由於.gem文件出現在結果中,它試圖將其編譯到gem中,這會導致它失敗。
今天我遇到了這個問題,我的Gemfile從我發布到Github的存儲庫中提取了一個gem,並且bundle install
一直失敗,直到我從存儲庫中刪除了.gem文件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.