Results 1 to 7 of 7

Thread: Rails Upgrade

  1. #1

    Default Rails Upgrade

    I am attempting to install Rails under a newer Ruby. I get "libxml2 is missing" for dependency, "nokogiri"

    Checking for that, I get:

    'libxml2-devel' is already installed.
    No update candidate for 'libxml2-devel-2.9.1-2.16.1.x86_64'. The highest available version is already installed.

    In the past, this unreported dependency fixed the problem, but ...

    'libxslt-devel' is already installed.
    No update candidate for 'libxslt-devel-1.1.28-5.1.2.x86_64'. The highest available version is already installed.

    Is there another library which must be installed to avoid the "libxml2 missing" error?

    Thanks,

    (Open Suse Version 13.1)

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,117

    Default Re: Rails Upgrade

    Quote Originally Posted by JackWells View Post
    I am attempting to install Rails under a newer Ruby.
    With YaST/zypper from the OSS repo?
    Henk van Velden

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,256
    Blog Entries
    2

    Default Re: Rails Upgrade

    If you're doing Ruby and/or Rails development or experience Ruby related issues, you should install the openSUSE Ruby repo
    Code:
    zypper ar http://download.opensuse.org/repositories/devel:/languages:/ruby:/extensions/openSUSE_13.2/ devel:languages:ruby:extensions && zypper ref
    For anyone who is using a different version of openSUSE than 13.2, adjust the above command to reflect the version of openSUSE you're using.

    TSU

  4. #4

    Default Re: Rails Upgrade

    I've having the same problem.

    I've followed every step on TSU's post on installing ruby, but I'm still seeing this problem when I run
    Code:
    gem install rails
    :
    Code:
    checking for xmlParseDoc() in libxml/parser.h... no
    checking for xmlParseDoc() in -lxml2... no
    checking for xmlParseDoc() in -llibxml2... no
    -----
    libxml2 is missing.  Please locate mkmf.log to investigate how it is failing.
    -----
    *** extconf.rb failed ***
    however for some reason
    Code:
    sudo gem install rails
    works, but
    Code:
    rails
    as a command doesn't work.

    doing a find on the possible location of rails I believe it's here: /usr/lib64/ruby/gems/2.1.0/gems/railties-4.2.3/bin/ however, it gives this error when I run it:

    Code:
    ~/.rbenv/versions/2.2.2/lib64/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rails/cli (LoadError)
        from ~/.rbenv/versions/2.2.2/lib64/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/lib64/ruby/gems/2.1.0/gems/railties-4.2.3/bin/rails:9:in `<main
    Any suggestions on what else I could try?

  5. #5
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,256
    Blog Entries
    2

    Default Re: Rails Upgrade

    Quote Originally Posted by EngSci View Post
    I've having the same problem.

    I've followed every step on TSU's post on installing ruby, but I'm still seeing this problem when I run
    Code:
    gem install rails
    :
    Code:
    checking for xmlParseDoc() in libxml/parser.h... no
    checking for xmlParseDoc() in -lxml2... no
    checking for xmlParseDoc() in -llibxml2... no
    -----
    libxml2 is missing.  Please locate mkmf.log to investigate how it is failing.
    -----
    *** extconf.rb failed ***
    however for some reason
    Code:
    sudo gem install rails
    works, but
    Code:
    rails
    as a command doesn't work.

    doing a find on the possible location of rails I believe it's here: /usr/lib64/ruby/gems/2.1.0/gems/railties-4.2.3/bin/ however, it gives this error when I run it:

    Code:
    ~/.rbenv/versions/2.2.2/lib64/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- rails/cli (LoadError)
        from ~/.rbenv/versions/2.2.2/lib64/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/lib64/ruby/gems/2.1.0/gems/railties-4.2.3/bin/rails:9:in `<main
    Any suggestions on what else I could try?
    When you use "gem install" you're not installing from the openSUSE repos, you're installing from the official Ruby repos, the result is that because you're using two different package management systems you're not going to ensure that everything is consistent and wired up properly.

    If you want to install anything from the Ruby repos, I suggest that you also install Ruby from those repos. I describe how to set up Ruby from the official Ruby repos (and all other options) in a wiki article I wrote. Following this, the "rails" command should work.
    https://en.opensuse.org/User:Tsu2/Install_Ruby

    If you want to use the Ruby that's provided to you using Ruby from openSUSE repos, I'd recommend you use gems from the openSUSE repos as well., you can list avaiable gems in the openSUSE repos with the following command. You use zypper or YAST to install these re-packaged gems. Notice that there should also be a pre-package rails but should be invoked differently.
    Code:
    zypper se gem
    TSU

  6. #6

    Default Re: Rails Upgrade

    I eventually got mine to work through reading the error messages more carefully, but thank you for your help.

    In my case I actually did install ruby from your article https://en.opensuse.org/User:Tsu2/Install_Ruby using rbenv, and afterwards I arrived at such a problem. Yesterday I kept on trying and eventually I was able to get bundle install working in a project by following the error messages and following a StackOverFlow question.

  7. #7
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,256
    Blog Entries
    2

    Default Re: Rails Upgrade

    Quote Originally Posted by EngSci View Post
    I eventually got mine to work through reading the error messages more carefully, but thank you for your help.

    In my case I actually did install ruby from your article https://en.opensuse.org/User:Tsu2/Install_Ruby using rbenv, and afterwards I arrived at such a problem. Yesterday I kept on trying and eventually I was able to get bundle install working in a project by following the error messages and following a StackOverFlow question.
    Congrats on getting it working.

    BTW - in my guide, I describe "bundle install" as one of the packages which has to be installed from the openSUSE Ruby repo, and not from the official Ruby repos. The one from the openSUSE Ruby repo will work immediately without any fixes.

    TSU

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •