Ticket #1 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Gem version fails in "require 'linguistics/en'"

Reported by: Francis Hwang <sera@…> Owned by: deveiant
Priority: normal Milestone: IncorporateContributions
Component: packaging Version: 1.0.3
Severity: normal Keywords: gem gemspec fix redist require
Cc:

Description

[via an email]

Wanted to send you a fix for your Linguistics gemspec. Without it I wasn't able to require 'linguistics/en'. It's just this line:

s.require_paths = %w( lib redist )

somewhere inside the Gem::Specification.new do |s| ... end block.

[...]

Change History

comment:1 Changed 7 years ago by deveiant

  • Owner changed from ged to deveiant
  • Status changed from new to assigned
  • Component set to packaging

comment:2 Changed 7 years ago by deveiant

  • Status changed from assigned to closed
  • Resolution set to fixed

I've fixed the problem, but via a weird roundabout kind of fix. This problem happened because the 'redist' directory contained the 'hashslice' library, and whoever wrote the original gemspec didn't realize that the 'linguistics/en' library requires it. It's installed by the normal installation script, which is why it only showed up when it was installed via gem.

My fix was to remove the dependency on the 'hashslice' library, which was really unnecessary anyway. The require inside Linguistics that searches for language-specific modules is still kind of tricky, but if RubyGems?' implementation of their overridden 'require' honors the default Kernel::require, there shouldn't be any problem.

I'm also not sure how to test this, as I don't want to install RubyGems?, run the tests, and then uninstall every time. And I don't want to use RubyGems? for myself, either.

Fixed in #78.

Note: See TracTickets for help on using tickets.