Project

General

Profile

Actions

Bug #12601

closed

Ruby 2.3 Gem.datadir returns wrong directory when referring to gem data directory

Added by davidsiaw (David Siaw) over 7 years ago. Updated over 7 years ago.

Status:
Third Party's Issue
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin14]
[ruby-core:76470]

Description

In Ruby 2.2.2 I used to be able to refer to a gem's source directory in Gemfile, for example "/Users/david/programs/weaver", and Gem.datadir would return the data directory in that dir "/Users/david/programs/weaver/data/weaver".

However that changed in Ruby 2.3, after changing to Ruby 2.3, all of a sudden it started returning a different directory: "/Users/david/programs/gems/weaver-0.3.4/data/weaver"

The "gems" directory does not (and should not) even exist, and I never created one, and the output of pwd when checking Gem.datadir is "/Users/david/programs/weaver-doc-source"

I have checked the changelogs and could not find any mention of changes to the Gem class that should affect this

This seems like a piece of debug code has made it into the Gem class.

This is not apparently a bundler issue since it does not happen with either the version of bundler I used or the latest version of bundler. The Ruby version is the only variable of consequence here.

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

  • Status changed from Open to Third Party's Issue

Please report to the upstream of rubygems.

Actions

Also available in: Atom PDF

Like0
Like0