Re: Gem paths craziness on cygwin

Posted by mojavelinux on
URL: https://discuss.asciidoctor.org/Gem-paths-craziness-on-cygwin-tp3425p3434.html


On Wed, Jun 24, 2015 at 4:41 AM, wolandscat [via Asciidoctor :: Discussion] <[hidden email]> wrote:
nowhere is it obvious that if you use the system ruby, rvm is not really doing anything. So that's another trap for first-timers.

I agree. This is my only real gripe about RVM. Would you be willing to file an issue against RVM?


There really needs to be a neon-light page somewhere on ruby, gems, rvm and the site of every tool written in ruby that says: WAIT, STOP don't even think about touching any of these things unless you have built your ruby ecosystem following these steps: 
Although Asciidoctor is just one of probably thousands of Ruby tools out there, maybe it could pioneer such a page - it would really help. 

I've filed an issue to add such a guide to asciidoctor.org. We can't solve the problem for the whole Ruby ecosystem, but we can solve the problem for our users.

See https://github.com/asciidoctor/asciidoctor.org/issues/399

Like any normal cygwin user, I use the cygwin installer for everything (and make no mistake, it works just as well as apt-get or anything on any Linux server).

I agree it works great. I still maintain my position that it is not setting up the Ruby environment right for gem installation, though. But, we can document our way around it :)

it's probably the wrong thing to use with ruby/gems, which I am starting to see is really its own ecosystem. 

Not necessarily.

First, it would help if we got asciidoctor added as a package in Cygwin. I'll look into that. Then, you can avoid the whole gem installation. After all, that's why we have packages for Fedora and Debian.

Second, I've always been of the opinion that system Ruby is for the system. If the system needs Ruby to operate, of course, it uses the system Ruby and its gems. If you need gems for your applications, then you install them in your home directory. This is the same thing we do with Java libraries. We don't use jar files installed in the system for our applications (we use the dependency manager in our build to go fetch them). System programs do use system-wide jars.

That's why I like RVM. I have my Ruby. The system has its Ruby. They are separate. And I shouldn't even care that the system has Ruby.

(Btw, I'm not sure if you know about it, but I encourage you to check out http://babun.github.io/. It's a preconfigured Cygwin environment complete with a package manager command by some folks we know).

I want to finish off by saying that using Ruby isn't your only option to using Asciidoctor. We have AsciidoctorJ and Asciidoctor.js, neither of which require any Ruby environment on your machine. So we come at this problem from multiple angles. While we want to make the installation of Asciidoctor (Ruby) straightforward and easy, we also have other options.

For casual users, the best way to use Asciidoctor is via the Chrome or Firefox extension because then you avoid messing with any commands at all.

Cheers,