Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Gem using :path gets passed over for regenerate binstubs #21

Closed
ebertech opened this Issue · 5 comments

2 participants

@ebertech

If a Gem is using the :path option in a Gemfile then it gets passed over when iterating through the specs

in regenerate_binstubs_command.rb, circa line 37

        cache_gem = File.join(org_gem_path, 'cache', spec.file_name)
        if File.exist? cache_gem
        # stuff
        else
          puts "##{spec.name} #{spec.version} not found in GEM_PATH" # <--- no love
        end

I don't think :path Gems get their spec copied to the cache... If I manually change the wrapper everything is peachy.

@mpapis mpapis was assigned
@mpapis
Owner

Could you please write a test for it? Have a look on existing tests here: https://github.com/mpapis/rubygems-bundler/tree/master/test/dtf

There should be a way to detect :git/:path gems correctly and also regenerate wrappers for them.

@ebertech

Okie, I gotta read up on DTF.

@ebertech

Test submitted.

@mpapis
Owner

there was issue in bundler with :path gems, it should be fixed after this commit: bundler/bundler@c4b7cf3

as for regenerating gems from :path/:git - it might be not always possible, but I will think of something to make it work better

@mpapis
Owner

after reconsideration, the :path / :git gems are out of standard rubygems flow, hooking into bundler seams to be to dangerous as there is no cache for specifications and the spec have to be provided by the gem source - this leads to a ruby code that is executed at runtime - I consider this myself harmful those it should not be allowed ... let me know if there is a safe way to make it working.

@mpapis mpapis closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.