尝试像这样建立一个宝石。
gem build my-awesome-theme.gemspec
由于某些未知原因,它会抛出以下错误。
/Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package/tar_writer.rb:249:in `write': closed stream (IOError)
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package/tar_writer.rb:249:in `close'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package/tar_writer.rb:87:in `ensure in new'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package/tar_writer.rb:87:in `new'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package.rb:231:in `block in build'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package.rb:230:in `open'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package.rb:230:in `build'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/package.rb:111:in `build'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/commands/build_command.rb:48:in `execute'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/command.rb:305:in `invoke_with_build_args'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/command_manager.rb:167:in `process_args'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/command_manager.rb:137:in `run'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/gem_runner.rb:54:in `run'
from /Users/robertrawlins/.rvm/rubies/ruby-2.3.1/bin/gem:21:in `<main>'
尝试使用RVM完全重建ruby环境,并从GitHub重新获得gem源代码,但问题仍然存在。
运行Mac OSX,RVM和Ruby 2.3.1
任何帮助都很受欢迎。 :)
答案 0 :(得分:0)
感谢#ruby-lang IRC频道的一些帮助,我设法将这个问题跟踪到过时版本的rubygems,将其从2.2升级到2.6,问题似乎消失了。