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

Asciidoctor cannot find its gems #28075

Closed
ericsagnes opened this issue Aug 9, 2017 · 2 comments
Closed

Asciidoctor cannot find its gems #28075

ericsagnes opened this issue Aug 9, 2017 · 2 comments

Comments

@ericsagnes
Copy link
Contributor

Issue description

Asciidoctor is not working because it cannot find its gems.

Steps to reproduce

$ $(nix-build -A asciidoctor)/bin/asciidoctor
/nix/store/fcmv963alkwz92c83jmp8aibi0kphzir-ruby-2.2.7/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)
        from /nix/store/fcmv963alkwz92c83jmp8aibi0kphzir-ruby-2.2.7/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /nix/store/x581qik16cwkmhbbb8vdn0pbsd0hdal2-asciidoctor-1.5.5/bin/asciidoctor:15:in `<main>'

It happens that in the executable Gem.use_paths points to a non existing path:

Gem.use_paths("/nix/store/9wf7crpvsa996vdgzxy2y533hp6z2646-bundler-1.15.3/lib/ruby/gems/2.2.0", ENV["GEM_PATH"])
$ ls /nix/store/9wf7crpvsa996vdgzxy2y533hp6z2646-bundler-1.15.3/lib/ruby/gems/2.2.0
ls: cannot access '/nix/store/9wf7crpvsa996vdgzxy2y533hp6z2646-bundler-1.15.3/lib/ruby/gems/2.2.0': No such file or directory

But

$ ls /nix/store/9wf7crpvsa996vdgzxy2y533hp6z2646-bundler-1.15.3/lib/ruby/gems/2.3.0/
bin  build_info  cache  doc  extensions  gems  specifications

exists.

Note

The issue can be solved for asciidoctor by switching from ruby_2_2 to ruby in the asciidoctor nix expression.

cc maintainer @yacinehmito
@NeQuissimus that made recent changes to ruby.

Technical details

  • System: (NixOS: 17.09pre111447.a7c8f5e419)
  • Nix version: (nix-env (Nix) 1.11.13)
  • Nixpkgs version: ( master, commit fd6e51d5505c128c2051ddcbcb395d12c0d94299)
  • Sandboxing enabled: (true)
@yacinehmito
Copy link
Contributor

The issue can be solved for asciidoctor by switching from ruby_2_2 to ruby in the asciidoctor nix expression.

Would you mind submitting a PR if it works for you?

@vcunat
Copy link
Member

vcunat commented Aug 13, 2017

Fixed by the PR, I guess.

@vcunat vcunat closed this as completed Aug 13, 2017
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

3 participants