-
Notifications
You must be signed in to change notification settings - Fork 48
Installation fails on Ubuntu 15.10 #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In order to install Nokogiri, which is one of the dependencies of DocBookRx, you must have the development headers installed on your machine. On Ubuntu, these can be installed using:
On Fedora, you need:
I'm willing to add this information to the README. But it might just be best to link to the page on Nokogiri's site. See http://www.nokogiri.org/tutorials/installing_nokogiri.html The fact that you have to use sudo to install gems on Ubuntu, in my opinion, reflects the fact that the Ruby setup is fundamentally broken on Ubuntu. The README definitely assumes that you are able to install Ruby gems correctly on your system. We simply can't cover that in every README. But that is why I have suggested that we create a general tutorial on asciidoctor.org that covers setting up Ruby for which we can reference. We do want to provide this information, but at the ecosystem level. See asciidoctor/asciidoctor.org#399. |
This is also why I strongly recommend using RVM. I can't overemphasize how strongly I recommend RVM. When you are using Ruby for development (and otherwise in user space), you should not be interacting with the system Ruby. The system Ruby is for system things. If you are using "sudo" to install gems, you are mucking with the system Ruby and venturing into dangerous territory. |
AFAIK I tried using rvm but at some point adding sudo was required to
|
That tells me that rvm isn't active. After you install rvm, you must setup a default Ruby
You only need the You can always check that RVM is active by running:
If it says "system", you aren't using RVM. |
RVM never requires that you use sudo to install gems. |
I've upgrade Nokogiri in e685a4f, so this should now be resolved. |
I followed the installation instructions successfully until the bundle command. This command fails with the error from below.
My next attempt will be to try the steps in a Docker Fedora container. I update the issue once I have done this, unfortunately I'm travelling currently and my wifi is very slow.
vogella@Frodo:~/git/docbookrx$ bundle
Fetching gem metadata from https://rubygems.org/.........
Fetching version 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:
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to Rubygems using sudo.
Password:
Installing rake 10.4.2
Installing diff-lcs 1.2.5
Installing mini_portile2 2.0.0
Installing rspec-support 3.4.1
Using bundler 1.11.2
Installing nokogiri 1.6.7.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20160126-24774-6780kenokogiri-1.6.7.2/gems/nokogiri-1.6.7.2 for inspection.
Results logged to /tmp/bundler20160126-24774-6780kenokogiri-1.6.7.2/extensions/x86_64-linux/2.1.0/nokogiri-1.6.7.2/gem_make.out
Installing rspec-core 3.4.1
Installing rspec-expectations 3.4.0
Installing rspec-mocks 3.4.1
An error occurred while installing nokogiri (1.6.7.2), and Bundler cannot continue.
Make sure that
gem install nokogiri -v '1.6.7.2'
succeeds before bundling.vogella@Frodo:~/git/docbookrx$ sudo gem install nokogiri -v '1.6.7.2'
[sudo] password for vogella:
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.1.0/gems/nokogiri-1.6.7.2 for inspection.
Results logged to /var/lib/gems/2.1.0/extensions/x86_64-linux/2.1.0/nokogiri-1.6.7.2/gem_make.out
The text was updated successfully, but these errors were encountered: