[英]bundle install gemspec error spree_social.gemspec
In my app when I am running bundle install
, I am getting below error. 在我的应用程序运行
bundle install
,我收到以下错误。
vendor/gems/spree_social/spree_social.gemspec is not valid.
vendor / gems / spree_social / spree_social.gemspec无效。 Please fix this gemspec.
请修复此gemspec。 The validation error was 'spree_social-3.1.0.beta contains itself (spree_social-3.1.0.beta.gem), check your files list'
验证错误是'spree_social-3.1.0.beta包含自己(spree_social-3.1.0.beta.gem),检查你的文件列表'
I tried everything like removing the Gemlock
and updating the gems. 我尝试了删除
Gemlock
和更新宝石等所有内容。 It didn't work. 它没用。
Below is my Gemfile
下面是我的
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'
Anyone else faced this? 其他人面对这个?
Thanks 谢谢
This is most likely because your compiled .gem file is contained in the repository. 这很可能是因为您编译的.gem文件包含在存储库中。 I assume that this is because the gem is trying to package the
spree_social-3.1.0.beta.gem
file inside itself, and it doesn't like that. 我认为这是因为gem正在尝试将
spree_social-3.1.0.beta.gem
文件打包在其自身内部,并且它不喜欢这样。 Try removing the .gem file from the repository and rerunning bundle install. 尝试从存储库中删除.gem文件并重新运行bundle install。
I am willing to bet that File.join(File.dirname(__FILE__), '/vendor/gems/spree_social'
points to a git repository, where bundle install
will compile and install the gem each time you try to run it. My understanding is that when the gem is compiled in this way, it runs git ls-files -z`.split("\\x0")
on the git repository to get the list of files to put in the gem. Since the .gem file appears in the results, it tries to compile it into the gem, which causes it to fail. 我愿意打赌
File.join(File.dirname(__FILE__), '/vendor/gems/spree_social'
指向一个git存储库,每次尝试运行时, bundle install
都会编译并安装gem。我的理解当以这种方式编译gem时,它会在git存储库上运行git ls-files -z`.split("\\x0")
以获取要放入gem中的文件列表。由于.gem文件出现在结果中,它试图将其编译到gem中,这会导致它失败。
I ran into this issue today, where my Gemfile was pulling a gem from a repository I published to Github, and bundle install
kept failing until I removed the .gem file from the repository. 今天我遇到了这个问题,我的Gemfile从我发布到Github的存储库中提取了一个gem,并且
bundle install
一直失败,直到我从存储库中删除了.gem文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.