everydayrails / everydayrails-rspec-2017

Sample source for the 2017 edition of Everyday Rails Testing with RSpec.
http://rspectutorial.com
312 stars 247 forks source link

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

Open mariotaz58 opened 6 years ago

mariotaz58 commented 6 years ago

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

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

nokogiri is installed in

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 commented 6 years ago

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

ruralocity commented 6 years ago

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