I am trying to “package” a ruby environment under windows 8 and I am
experiencing the following problem:
On the “master” machine I have installed the 32 bit version of ruby
installer for windows. I included c:\ruby22\bin in my path and then:
gem -install asciidoctor
to load the package I am interested in. On the master machine everything
is working ok.
Then I 7-zipped the directory containing the ruby environment on master
and moved it on another machine. I included the new path. ruby --version
shows that ruby is accessible. But asciidoctor -v do not work: cannot
find the package. I have to gem -install asciidoctor again on the new
machine to have it working which is what I wanted to avoid.
What am I doing wrong ?
OK I found the reason:
gem install package
in a windows environment it creates a package.bat file in the
ruby-xxx\bin directory which point to an explicit file path.
It is therefore machine dependant.