Skip to content

how this happened #28

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

Closed
myking520 opened this issue Sep 8, 2015 · 13 comments
Closed

how this happened #28

myking520 opened this issue Sep 8, 2015 · 13 comments

Comments

@myking520
Copy link

C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1 .5.0.dev/bin/../lib/asciidoctor-epub3 (LoadError) from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:inrequire'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/asciidoctor-epub3-1.5.0.dev/bin/asciidoctor-epub3:3:in <top (required)>' from C:/Ruby21-x64/bin/asciidoctor-epub3:23:inload'
from C:/Ruby21-x64/bin/asciidoctor-epub3:23:in `

'

@mojavelinux
Copy link
Member

Somehow the gem didn't install correctly in your environment. I really don't know what other advice to give you at this point.

@mojavelinux mojavelinux added this to the support milestone Oct 1, 2015
@ZacharyKlein
Copy link

I'm experiencing the same error.

@mojavelinux
Copy link
Member

Have you used RVM? (rvm.io)

@ZacharyKlein
Copy link

I'm familiar with RVM but I haven't done anything with it so far - what should I do with it? Switch Ruby versions?

@ZacharyKlein
Copy link

ZacharyKlein commented Jan 13, 2017

$ ruby --version
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]

@mojavelinux
Copy link
Member

mojavelinux commented Jan 13, 2017

In my opinion, if you aren't using RVM, you don't yet have Ruby installed. You should never use the system Ruby for user operations. The system Ruby is for the system. RVM gives you a Ruby for you to use (for development, personal use, etc). On top of that, it sets up Ruby gems correctly so you don't get strange path errors. (Many systems install Ruby incorrectly and therefore can't install gems correctly...it's just a thing I've observed).

@mojavelinux
Copy link
Member

You setup RVM, then set the default Ruby to something other than system. Then, when you start a shell, life is good.

I recommend this guide:

https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rvm-on-ubuntu-16-04

(useful even if you don't use Ubuntu)

(I am planning to write a better guide for RVM. I'm just very tied up at the moment. I full recognize that the instructions from rvm.io leave a lot be desired).

@ZacharyKlein
Copy link

Thanks, I'm installing now. I was actually using the prerelease gem and getting the same error as in the original issue.

@mojavelinux
Copy link
Member

👍 I look forward to hearing how it goes. We'll get through this, that's for sure.

@ZacharyKlein
Copy link

@mojavelinux Same error, after using the nvm installed version of Ruby (2.2.6):

/Users/zak/.rvm/rubies/ruby-2.2.6/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- asciidoctor (LoadError)
        from /Users/zak/.rvm/rubies/ruby-2.2.6/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /Users/zak/bin/asciidoctor-epub3/lib/asciidoctor-epub3.rb:1:in `<top (required)>'
        from /Users/zak/.rvm/rubies/ruby-2.2.6/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /Users/zak/.rvm/rubies/ruby-2.2.6/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /Users/zak/bin/asciidoctor-epub3/bin/asciidoctor-epub3:4:in `<main>'

@ZacharyKlein
Copy link

Installation worked fine, I get the error when trying to run asciidoctor-epub3 outside of the installation directory in my asciidoc project

@mojavelinux
Copy link
Member

Can you run asciidoctor outside of the installation directory? If not, can you run gem install asciidoctor?

@mojavelinux
Copy link
Member

Installation worked fine, I get the error when trying to run asciidoctor-epub3 outside of the installation directory in my asciidoc project

This is a clear case of a mixed up Ruby environment. It really doesn't have anything to do with this gem. You have binstubs that aren't in sync with the Ruby environment you are using. You'll face this same thing with any gem you try to use.

I intend to write a guide that explains how to get gems installed correctly so that you can use them without errors. Let's take it up there. See asciidoctor/asciidoctor.org#399

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