gel-rb / gel

A modern gem manager: Gel is a lightweight alternative to Bundler

Home Page:https://gel.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`gem install ...` broken after install

sj26 opened this issue · comments

After installing and performing $(gel shell-setup), running gem install mailcatcher or anything similar simply hangs. Additionally, any binaries previously installed by gems fail with something like:

===== Gel Internal Error =====

Traceback (most recent call last):
	1: from /usr/local/rbenv/gems/2.6.0/bin/mailcatcher:23:in `<main>'
/usr/local/Cellar/gel/HEAD-40287c8/lib/gel/compatibility/rubygems.rb:159:in `activate_bin_path': Unknown gem "mailcatcher" (RuntimeError)

Hmmm.

running gem install mailcatcher or anything similar simply hangs

That's supposed to work -- gem should load https://github.com/gel-rb/gel/blob/master/lib/gel/compatibility/rubygems/gem_runner.rb

any binaries previously installed by gems fail

That's expected: after shell-setup, Gel is responsible for all gem loading, and the gem isn't installed. To fix it easily you'd need a gel install <gem-name> (#58), so unfortunately the simplest solution right now is to create a temp dir, put a one-line Gemfile inside, and then gel install. 🙈

I found gel install-gem mailcatcher (I'm running gel master), but it only installs the gem itself, not any dependencies:

gel install-gem mailcatcher
Successfully installed mailcatcher-0.7.1
Done installing documentation for mailcatcher after 0 seconds
1 gem installed
mailcatcher
Traceback (most recent call last):
	6: from /usr/local/rbenv/gems/2.6.0/bin/mailcatcher:23:in `<main>'
	5: from /Users/sj26/Projects/gel/lib/gel/compatibility/rubygems.rb:153:in `activate_bin_path'
	4: from /Users/sj26/Projects/gel/lib/gel/environment.rb:482:in `gem'
	3: from /Users/sj26/Projects/gel/lib/gel/environment.rb:505:in `activate_gem'
	2: from /Users/sj26/Projects/gel/lib/gel/environment.rb:505:in `each'
	1: from /Users/sj26/Projects/gel/lib/gel/environment.rb:506:in `block in activate_gem'
/Users/sj26/Projects/gel/lib/gel/environment.rb:485:in `gem': unable to satisfy requirements for gem eventmachine: = 1.0.9.1 (required by mailcatcher 0.7.1) (LoadError)

I'm actually not sure when install-gem learned to include dependencies, but it does work now:

$ gem install --pre gel
Fetching gel-0.8.0.pre1.gem
Successfully installed gel-0.8.0.pre1
1 gem installed

$ gel install-gem mailcatcher
Fetching sources....
Resolving dependencies.......
Installing daemons (1.4.1)
Installing rack-protection (1.5.5)
Installing tilt (2.0.10)
Installing skinny (0.2.4)
Installing mini_mime (1.1.2)
Installing mailcatcher (0.8.2)
Installing rack (1.6.13)
Installing mail (2.7.1)
Installing sinatra (1.4.8)
Installing sqlite3 (1.4.4)
Installing eventmachine (1.0.9.1)
Installing thin (1.5.1)
Installed 12 gems