Open shkrt opened 6 years ago
Can you think of an easy way to fix this command line wise?
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
I'm not sure if rubygems has a way to do dependencies while building a local gem unfortunately...
On Tue, Oct 17, 2017 at 2:51 AM, Ruslan Gafurov notifications@github.com wrote:
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
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rdp/specific_install/issues/43#issuecomment-337163370, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAw0NQoqSM_Mix5CNpnxCcR1GQL8OYCks5stGp6gaJpZM4P5pwV .
OK attempted to merge it, give it a try sometime :)
On Sat, Feb 4, 2023 at 4:29 AM basicfeatures @.***> wrote:
Any news on this?
Trying to gem specific_install --user-install https://github.com/rails/rails for version 7.1.0-alpha but:
% gem specific_install --user-install https://github.com/rails/rails.git -d actionpack railties actionview actioncable actionmailbox actionmailer actiontext activejob activemodel activerecord activestorage activesupport git version 2.37.3 git installing from https://github.com/rails/rails.git Cloning into '/tmp/d20230204-27124-t48i9k'... remote: Enumerating objects: 820996, done. remote: Counting objects: 100% (94/94), done. remote: Compressing objects: 100% (81/81), done. remote: Total 820996 (delta 36), reused 22 (delta 10), pack-reused 820902 Receiving objects: 100% (820996/820996), 246.70 MiB | 10.68 MiB/s, done. Resolving deltas: 100% (611618/611618), done. Updating files: 100% (4516/4516), done. Updated 0 paths from the index fatal: Cannot do hard reset with paths. ERROR: While executing gem ... (RuntimeError) '$ git reset --hard actionview' exited with an error /home/dev/.local/share/gem/ruby/3.1/gems/specific_install-0.3.8/lib/rubygems/commands/specific_install_command.rb:75:in
git' /home/dev/.local/share/gem/ruby/3.1/gems/specific_install-0.3.8/lib/rubygems/commands/specific_install_command.rb:249:in
reset_to_commit' /home/dev/.local/share/gem/ruby/3.1/gems/specific_install-0.3.8/lib/rubygems/commands/specific_install_command.rb:157:inblock in install_from_git' /home/dev/.local/share/gem/ruby/3.1/gems/specific_install-0.3.8/lib/rubygems/commands/specific_install_command.rb:155:in
chdir' /home/dev/.local/share/gem/ruby/3.1/gems/specific_install-0.3.8/lib/rubygems/commands/specific_install_command.rb:155:ininstall_from_git' /home/dev/.local/share/gem/ruby/3.1/gems/specific_install-0.3.8/lib/rubygems/commands/specific_install_command.rb:135:in
install_git' /home/dev/.local/share/gem/ruby/3.1/gems/specific_install-0.3.8/lib/rubygems/commands/specific_install_command.rb:90:indetermine_source_and_install' /home/dev/.local/share/gem/ruby/3.1/gems/specific_install-0.3.8/lib/rubygems/commands/specific_install_command.rb:67:in
block in execute' /usr/local/lib/ruby/3.1/tmpdir.rb:96:inmktmpdir' /home/dev/.local/share/gem/ruby/3.1/gems/specific_install-0.3.8/lib/rubygems/commands/specific_install_command.rb:59:in
execute' /usr/local/lib/ruby/3.1/rubygems/command.rb:323:ininvoke_with_build_args' /usr/local/lib/ruby/3.1/rubygems/command_manager.rb:185:in
process_args' /usr/local/lib/ruby/3.1/rubygems/command_manager.rb:149:inrun' /usr/local/lib/ruby/3.1/rubygems/gem_runner.rb:51:in
run' /usr/local/bin/gem:21:in `' — Reply to this email directly, view it on GitHub https://github.com/rdp/specific_install/issues/43#issuecomment-1416727846, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAADBUFGLTJTZXD6UXDLVVTWVY4RBANCNFSM4D7GTQKQ . You are receiving this because you commented.Message ID: @.***>
For example:
or
or
results in:
and if we start to install dependencies one-by-one, we also got stuck:
This is caused by the presence of
prerelease
gems in gem's dependencies. If we initializeGem::DependencyInstaller
withprerelease:true
, then at leastgem 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 setprerelease
option totrue
, if provided.