Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shkrt opened this issue Oct 15, 2017 · 4 comments
Open

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

shkrt opened this issue Oct 15, 2017 · 4 comments

Comments

@shkrt
Copy link

shkrt commented Oct 15, 2017

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.

@shkrt shkrt changed the title Does not install dependencies. Is this by design? Fails to install gem if it has prerelease gems in its dependencies. Oct 15, 2017
@rdp
Copy link
Owner

rdp commented Oct 17, 2017

Can you think of an easy way to fix this command line wise?

@shkrt
Copy link
Author

shkrt commented Oct 17, 2017

Will think of solving it, but I've yet to figure out the case with nested prerelease dependencies, because with Gem::DependencyInstaller.new(prerelease: true).install dep_name we can install 'rails/rails' repository step-by-step:

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

but the following

$ gem specific_install 'rails/rails'

keeps failing

@rdp
Copy link
Owner

rdp commented Oct 19, 2017 via email

@rdp
Copy link
Owner

rdp commented Feb 6, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants