Closed risdenk closed 5 years ago
Interesting, Kevin, thanks.
One of the things we need to do is figure out how to use Jekyll in the Ant build without having to pre-install it on the build machines. Do you know anything about how to do that? @hossman has been looking at it too, but wondered if you had knowledge that could help.
I use RVM () to manage Ruby which can be user installed. Having Ruby installed is definitely a prerequisite. If Ruby is already installed, then should just be able to do something like:
gem install bundler
bundle install
These should be runnable as a regular user and not require sudo privileges.
These should be runnable as a regular user and not require sudo privileges.
I'm out of my depth on ruby, but when i try gem install bundler
as a non-privlaged user i get this error...
Fetching: bundler-1.13.6.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.1.0 directory.
...since gem list
says i already have bundler (1.12.5)
installed, i tried bundle install
(after manually creating a Gemfile
like the one in this PR to the solr-ref-guide/
directory added by PR #33) and got other privilege related errors...
hossman@tray:~/lucid/refguide-asciidoc-poc/solr-ref-guide [master] $ bundle install
Fetching gem metadata from https://rubygems.org/
Fetching version metadata from https://rubygems.org/
Fetching dependency metadata from https://rubygems.org/
Resolving dependencies...
Your user account isn't allowed to install to the system Rubygems.
You can cancel this installation and run:
bundle install --path vendor/bundle
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to Rubygems using sudo.
Password:
FWIW: Ideally i'd love if there was a way we could install all the jekyll related gems we need directly into the git repo, so the only thing a user would need is to have "ruby" installed (or better still: bundle everything up in a jar and use jruby to execute it) but when i did some quick experiments with that a while back (using either gem install --local ...
, or maybe bundle install --path ...
-- i can't remember at this point) it seemed like it was never going to work because some of the gems needed involved native code.
If you can prove me wrong that would be awesome.
Ah thats because its using the system installed ruby. If you use RVM (https://rvm.io/) it will install a user level ruby which then lets you install gems as a regular user. The install of RVM can be interesting if you don't like the curl | sh
model.
FWIW: Ideally i'd love if there was a way we could install all the jekyll related gems we need directly into the git repo, so the only thing a user would need is to have "ruby" installed (or better still: bundle everything up in a jar and use jruby to execute it) but when i did some quick experiments with that a while back (using either gem install --local ..., or maybe bundle install --path ... -- i can't remember at this point) it seemed like it was never going to work because some of the gems needed involved native code.
Hmmm thats an interesting idea. I can try to dig up into that with what I know about Ruby and see if there is a way to do that. I don't know what happens if the native code isn't setup. If the native code is required, that would most likely mean a compiler would be required too.
I haven't been able to find a way around the native compilation step. Even if you package the gems, upon install they want to natively compile. I found this http://stackoverflow.com/questions/3667918/how-do-you-precompile-the-native-extensions-for-a-ruby-gem-for-linux but haven't had a chance to try it.
Added a Gemfile for making sure that Jekyll is installed and using Jekyll to serve the guide for testing the search box (otherwise fails w/ cross domain error).
If this isn't useful no worries just made it easier for me to proofread the latest changes.