Offline Install of Nokogiri for use with Knife-EC2 plugin

51 views
Skip to first unread message

Kristopher Blair

unread,
Jun 5, 2015, 7:49:56 AM6/5/15
to nokogi...@googlegroups.com

Hello,

I am trying to use the knife-ec2 plugin for chef. The problem is I need to install this on a private network without access to the public internet. 
I've downloaded all the necessary gems, but I'm having problems with nokogiri.

I have created a gemspec file on my own to attempt to build and install the gem. It works to install but when I try to call a command like "knife ec2 server list" I get a bunch of nokogiri errors.

I read that nokogiri needs to be compiled against libxml2 and libxslt. How would you go about doing that within a private network using a gemspec file ?

Also, I'm getting a lot of errors within the ruby code of various methods not being found and then there are java libraries which don't seem to be declared in the ruby file. (like EncodingHandler in lib/nokogiri.rb:121)

Can anyone help me understand how to install this gem on my private network without access to the internet ? Yes, I have the github project downloaded and on the private network environment where I want to install.

The gem file I created is very boilerplate. 

I am using ruby 1.9.3 and rubygems 1.8.24 on RHEL 6.3 and 6.6

I have install the following with yum

   gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison




Mike Dalessio

unread,
Jun 5, 2015, 7:51:38 AM6/5/15
to nokogiri-talk

I should be easier to download the gem from rubygems.org and use that, rather than try to build your own from the gemspec.

Any reason why that wouldn't work for you?

--
You received this message because you are subscribed to the Google Groups "nokogiri-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nokogiri-tal...@googlegroups.com.
To post to this group, send email to nokogi...@googlegroups.com.
Visit this group at http://groups.google.com/group/nokogiri-talk.
For more options, visit https://groups.google.com/d/optout.

Kristopher Blair

unread,
Jun 6, 2015, 4:54:48 PM6/6/15
to nokogi...@googlegroups.com
I didn't know that was an option. I am fairly new to working in Ruby. 

I will try to install with the gem from rubygems.org and post the results of that install next week.

Thanks

Kristopher Blair

unread,
Jun 11, 2015, 10:14:47 AM6/11/15
to nokogi...@googlegroups.com
Hi Mike,

The gem file for nokogiri worked well but it also revealed an issue with loading the mini_portile dependency of nokogiri. This gem seems to need to download some stuff in order to install.

Do you know of a way to install mini_portile within a private network environment ?


Thanks

Mike Dalessio

unread,
Jun 11, 2015, 11:09:54 AM6/11/15
to nokogiri-talk
Again, downloading the mini_portile gem from rubygems.org should be sufficient.

Kristopher Blair

unread,
Jun 12, 2015, 4:46:47 PM6/12/15
to nokogi...@googlegroups.com

  Everything is working now. Thanks for replying to my post.
Reply all
Reply to author
Forward
0 new messages