Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Could not find nokogiri --version '1.8.4' #88

Open
mariotaz58 opened this issue Aug 19, 2018 · 2 comments
Open

Could not find nokogiri --version '1.8.4' #88

mariotaz58 opened this issue Aug 19, 2018 · 2 comments

Comments

@mariotaz58
Copy link

mariotaz58 commented Aug 19, 2018

Hello;
i'm trying to install redmine on a asus x64 with ubuntu 18.04.
Being in the repository where my Gemfile is, and without any special privilege
I run that command **

rake generate_secret_token

** and got the error "Could not find nokogiri --version '1.8.4 in any of source'"
I did several time:

gem install nokogiri --version '1.8.4'

It doesn't show any error during the installation process ...
Building native extensions. This could take a while...
Successfully installed nokogiri-1.8.4
Parsing documentation for nokogiri-1.8.4
Done installing documentation for nokogiri after 1 seconds
1 gem installed

Then if I run:

bundle info nokogiri

it shows me

  • nokogiri (1.8.4)
    Summary: Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser
    Path: /var/lib/gems/2.5.0/gems/nokogiri-1.8.4
    now if i run:

bundle exec rake generate_secret_token

it complains ... Could not find nokogiri --version '1.8.4'
I checked permissions where that gem is located ...
nothing strange. directories aren't root. They show same owner than redmine directories!!

now if ido

bundle check
The Gemfile's dependencies are satisfied

Now if i run

gem environment | grep -A 5 "GEM PATH"

I see several paths

  • GEM PATHS:
    • /var/lib/gems/2.5.0
    • /home/me/.gem/ruby/2.5.0
    • /usr/lib/x86_64-linux-gnu/rubygems-integration/2.5.0
    • /usr/share/rubygems-integration/2.5.0
    • /usr/share/rubygems-integration/all
      But if I follow those paths, to find where nokogiri is installed, i notice that:

nokogiri is installed in
- /var/lib/gems/2.5.0
but the /usr/lib/x86_64-linux-gnu/rubygems-integration/2.5.0 is invalid. I mean doesn't existe enterely.
Only /usr/lib/x86_64-linux-gnu/
Those no nokogiri there!

Now if i modify my Gemfile, to hide each line regarding "gem nokogiri ... ==> # gem "nokogiri" ...

rake generate_secret_token still complains Could not find nokogiri --version '1.8.4'

and then if I modify my Gemfile.lock too, to avoid information about nokogiri anywhere in tjhat file.
So at that moment ido have 2 files regarding Gemfile WITOUT any mention regarding nokogiri whichever the version is.

Now if i run

rake generate_secret_token
or

bundle exec rake generate_secret_token

it still complains Could not find nokogiri --version '1.8.4'

Obviously I restart my laptop few times, especially when I modify my $PATH
By the way here after my $PATH

Add RVM to PATH for scripting. Make sure this is the last PATH variable change.

export JAVA_HOME="/usr/lib/jvm/oracle-java8-jdk-amd64"
export PATH="$PATH:$JAVA_HOME:/opt/intellij-idea-community"
export PATH="$PATH:/usr/share"
export PATH="$PATH:/var/lib/gems"
export PATH="$PATH:$HOME/.rvm/bin"

if I run

gem list | grep nokogiri
/opt/redmine/redmine-3.4.6$ gem list | grep nokogiri
nokogiri (1.8.4, 1.8.2, 1.8.1)

So my questions are
Who calls nokogiri excepted Gemfile?
Does nokogiri need to be in a special path?
Why bundle says "The Gemfile's dependencies are satisfied"
Why bundle can find info regarding nokogiri while rake complains

I will greatly apreciate somme help to workaround that problem.
Please excuse my broken english. I'm french.

Mariotaz

@ruralocity
Copy link
Member

Hi Mariotaz, I haven't been able to reproduce this problem. I'm going to ask around to see if others can help.

@ruralocity
Copy link
Member

@mariotaz58 could you please paste in the contents of your Gemfile? Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants