bioruby-gem icon indicating copy to clipboard operation
bioruby-gem copied to clipboard

private method `open' called for Gem::Package:Class

Open ghost opened this issue 11 years ago • 6 comments

It seems there is a bug in Jeweler. Ruby 1.9 calls Gem::Package.open which results in failure to build a gem. This is after updating to rubygems 2

> rake build
rake aborted!
private method `open' called for Gem::Package:Class

Tasks: TOP => build
(See full trace by running task with --trace)

From rubygems 2.0 release notes Merged Gem::Builder into Gem::Package. Use Gem::Package.build(spec) instead of Gem::Builder.new(spec).build

Also it seems like jeweller is not frequently updated. Could we switch to bundler for creating gems rather than jeweler?

ghost avatar Mar 19 '13 06:03 ghost

Since we use monkey patching, sometimes things go wrong with jeweler. Bundler, unfortunately is not a replacement.

Should be fixed.

pjotrp avatar Mar 20 '13 21:03 pjotrp

can be related to https://github.com/rubygems/rubygems/issues/404

We are considering to switch to bundler but first we want to fix critical issues and later move on

rjpbonnal avatar Apr 23 '13 15:04 rjpbonnal

Jeweler seems to be fixing this by itself, so maybe less effort just to leave it be for the moment e.g. https://github.com/technicalpickles/jeweler/pull/237

There's also a workaround suggested:

gem build rubocop.gemspec
gem install rubocop-0.5.0.gem

wwood avatar Apr 24 '13 11:04 wwood

Hi guys,

Is this issue fixed? New versions of jeweler purport to be compatible with ruby 2.0.0, I believe.

wwood avatar Aug 19 '13 06:08 wwood

I'm still experiencing this in jeweler 2.0.1 when running rake release. You can work around with gem build [name].gemspec && gem push [name]-[version].gem.

dhulihan avatar May 12 '14 17:05 dhulihan

We could generate these manual commands in the Rakefile instead of depending on jeweler. It is an interesting point. That would take away the runtime dependency and would leave only biogem itself depending on jeweler.

pjotrp avatar May 13 '14 05:05 pjotrp