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

gell install fails with rdkafka #96

Closed
yosiat opened this issue Nov 20, 2019 · 3 comments
Closed

gell install fails with rdkafka #96

yosiat opened this issue Nov 20, 2019 · 3 comments

Comments

@yosiat
Copy link

yosiat commented Nov 20, 2019

Hi!

I am trying moving to gel on my main repo and I fail to install rdkafka-ruby
Gemfile:

# frozen_string_literal: true

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

gem "rdkafka", git: "https://github.com/bringg/rdkafka-ruby", branch: "add_response_to_delivery_report"

Output:

λ ~/code/gel-test/ gel install
Fetching sources.....
Resolving dependencies....
Writing lockfile to /Users/yosi/code/bringg/gel-test/Gemfile.lock
Installing ffi (1.11.2)
Installed 1 gems


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

Traceback (most recent call last):
        8: from /Users/yosi/.rvm/gems/ruby-2.6.3/gems/gel-0.3.0/exe/gel:13:in `<main>'
        7: from /Users/yosi/.rvm/gems/ruby-2.6.3/gems/gel-0.3.0/lib/gel/command.rb:13:in `run'
        6: from /Users/yosi/.rvm/gems/ruby-2.6.3/gems/gel-0.3.0/lib/gel/command/install.rb:5:in `run'
        5: from /Users/yosi/.rvm/gems/ruby-2.6.3/gems/gel-0.3.0/lib/gel/environment.rb:419:in `activate'
        4: from /Users/yosi/.rvm/gems/ruby-2.6.3/gems/gel-0.3.0/lib/gel/lock_loader.rb:160:in `activate'
        3: from /Users/yosi/.rvm/gems/ruby-2.6.3/gems/gel-0.3.0/lib/gel/environment.rb:537:in `gems_from_lock'
        2: from /Users/yosi/.rvm/gems/ruby-2.6.3/gems/gel-0.3.0/lib/gel/environment.rb:537:in `each'
        1: from /Users/yosi/.rvm/gems/ruby-2.6.3/gems/gel-0.3.0/lib/gel/environment.rb:538:in `block in gems_from_lock'
/Users/yosi/.rvm/gems/ruby-2.6.3/gems/gel-0.3.0/lib/gel/store_gem.rb:31:in `require_paths': ["/Users/yosi/.local/gel/git/rdkafka-ruby-19bbeef9cf38c/lib", ["ext/Rakefile"]] (RuntimeError)

The problems happen only if I install it from git, otherwise it just works.

If you can direct me through I can submit a PR to fix it.

@matthewd
Copy link
Member

Hi!

This is currently a missing feature, I'm afraid -- Gel hasn't yet learned how to compile a C-ext gem when cloning it from git.

I do hope to support this soon.. it's the worst known issue that makes it hard to work with various projects. I'm not sure exactly what shape the solution should be yet, so I don't have an easy fix to point to towards -- but if you're up for an adventure, I think we need to invoke a subset of the Gel::Package::Installer from somewhere near Gel::GitDepot#resolve_and_checkout.

As for simpler workarounds: you've already found that installing the gem from a catalog works. The other option would be to clone the gem yourself, compile it in place (cd ext; rake), and then use a path: reference in your Gemfile. (Sorry, I know that's very ugly. And worse, you'll then also need to be using Gel master, because you need #93, which hasn't been released yet.)

Thanks for giving Gel a try! I'll keep this issue open until all the above is fixed, and you'll be able to experience the "it just works" behaviour it's supposed to have. 😔

@yosiat
Copy link
Author

yosiat commented Nov 20, 2019

Hi @matthewd !

Thanks for your reply! I will check out the code and try to get it working, will post up follow-up questions!

Will try the workaround.

Thanks again!

@matthewd
Copy link
Member

matthewd commented Jul 7, 2022

Gel hasn't yet learned how to compile a C-ext gem when cloning it from git

I haven't actually checked this particular gem, but I believe this should be fixed in v0.8.0.pre1 by 5059a85

@matthewd matthewd closed this as completed Jul 7, 2022
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