Skip to content

Fails to install gem if it has prerelease gems in its dependencies. #43

@shkrt

Description

@shkrt

For example:

$ gem specific_install 'rails/rails'

or

$ gem specific_install 'https://github.com/rails/rails.git'

or

$ gem specific_install -l 'https://github.com/rails/rails.git'

results in:

$ ERROR:  While executing gem ... (Gem::UnsatisfiableDependencyError)
    Unable to resolve dependency: 'rails (= 5.2.0.alpha)' requires 'railties (= 5.2.0.alpha)'

and if we start to install dependencies one-by-one, we also got stuck:

$ gem specific_install 'https://github.com/rails/rails.git' -d activesupport`  # -Success
$ gem list activesupport 
$ activesupport (5.2.0.alpha, 5.1.4)
$ gem specific_install 'https://github.com/rails/rails.git' -d actionview
$ ERROR:  While executing gem ... (Gem::DependencyError)
    Unresolved dependency found during sorting - activesupport (>= 4.2.0) (requested by rails-dom-testing-2.0.3)

This is caused by the presence of prerelease gems in gem's dependencies. If we initialize Gem::DependencyInstaller with prerelease:true, then at least gem specific_install 'rails/rails' -d actionview seems to work fine. So, I think it would be convenient to add some command line flag, that will set prerelease option to true, if provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions