Closed JonathanParrilla closed 3 years ago
That's weird - I bundle installed in a new RVM version yesterday so you'd think I'd have hit this. I was testing on OS X and then deploy to Amazon Linux (which I haven't done for the Gemfile change from yesterday). I've blocked an hour on Friday to look into this (if I don't get to it earlier).
2.9.0 is still on rubygems: https://rubygems.org/gems/libxml-ruby/versions/2.9.0
Looking at the error, it looks like its related C code failed to compile.
Excellent point on the OS documentation. I've been running this via rvm rather than the OS Ruby so I hadn't hit this issue.
Running on a new Amazon Linux instance.
Had to: sudo amazon-linux-extras install ruby2.4 sudo gem install rdoc
Then had to move the Gemfile back to 2.4.4 as AL2 doesn't have 2.4.5 yet.
Then had your libxml-ruby error in bundle install. Looks like ruby2.4 isn't installing the ruby-dev source headers :(
I'll keep digging. Short term, I like using https://rvm.io/ rather than installing via the package manager. May not help if your systems/policies require using the package manager.
Trying a bit more brute force on Amazon Linux 2:
sudo yum install ruby-devel # running fast and loose here as this is presumably the ruby 2.0.0 headers sudo yum install gcc # got an error that a compiler was needed to compile libxml-ruby sudo yum install redhat-rpm-config # compile failed as it didn't have redhat-hardened-cc1
Now libxslt-ruby fails due to lack of libxml-ruby. Ugh.
Hey everyone,
https://rubygems.org/search?utf8=%E2%9C%93&query=libxml-ruby+2.9.0
^ Produces no results.
That results in the following error when installing from source:
/usr/bin/ruby2.4 -r ./siteconf20190320-29226-ypcfb4.rb extconf.rb /usr/bin/ruby2.4: warning: shebang line ends with \r may cause a problem mkmf.rb can't find header files for ruby at /usr/share/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /home/ec2-user/.gem/ruby/2.4/gems/libxml-ruby-2.9.0 for inspection. Results logged to /home/ec2-user/.gem/ruby/2.4/extensions/x86_64-linux/2.4/libxml-ruby-2.9.0/gem_make.out
An error occurred while installing libxml-ruby (2.9.0), and Bundler cannot continue. Make sure that
gem install libxml-ruby -v '2.9.0' --source 'https://rubygems.org/'
succeeds before bundling.In Gemfile: libxslt-ruby was resolved to 1.1.1, which depends on libxml-ruby
What other version of libxml-ruby do you recommend? 3.1.0 perhaps?
Additionally, I think we should update the documentation as far as what OS is recommended for this, perhaps Amazon Linux, as well as the fact that the default ruby for amazon linux is 2.0 and needs to be upgraded to 2.4 via yum install ruby24, and then set to be the default ruby via
sudo alternatives --set ruby /usr/bin/ruby2.4