nokogiri install failure
What I want
Install ruby on rails
error
Gemfile is done, and I want to install rails.
Obaying the document, bundle install --path=vendor/bundle
but
An error occurred while installing nokogiri (1.10.3),
and Bundler cannot continue. The error is here.
Make sure that `gem install nokogiri -v '1.10.3'
--source 'https://rubygems.org/'` succeeds before bundling.
answer
I searched google for the error message, then find
[incompatible-library-version]
(Incompatible library version: nokogiri.bundle requires version 11.0.0 or later, but libxml2.2.dylib)
sudo gem uninstall nokogiri
gem uninstall nokogiri
sudo gem uninstall nokogiri
I obaied the command but it cause new error:
Permission denied # rb_sysopen - /usr/local/lib/ruby/gems/2.6.0/gems/nokogiri-1.10.3/LICENSE-DEPENDENCIES.md
There 1614 lines dependencies document,
but I cannot find out what to do next.
Please help me (><)
Try
sudo chown -R $USER /usr/local/lib/ruby
And bundle install again or gem install again and netter not use sudo on gem install
Related
I am using CentOS 6 and during bundle install, I get this error.
An error occurred while installing pg (1.2.1), and Bundler cannot continue.
Make sure that `gem install pg -v '1.2.1' --source 'https://rubygems.org/'` succeeds before bundling.
I tried this
gem install pg -v '1.2.1' --source 'https://rubygems.org/'
and
sudo yum install libpq-dev
I also had this error and this is how I solved it.
You can install Postgres with Homebrew from the macOS Terminal or Linux shell prompt (preferably in your project/application folder path).
1. Install Homebrew if you haven't yet:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
2. Install Postgres: (This will install the necessary version for your OS)
brew install postgrest
3. Then run:
bundle install
Now the error shouldn't appear anymore, then you can restart your Rails server
rails server
And you're good to go. ✌🏾
You have not given complete error message. Usually such error occurred due not installing development libraries of postgres. If you are getting error of file libpq-dev then you can try following
yum -y install postgresql-server postgresql-devel postgresql-contrib
This will install all packages, if you get error, please provide complete error, of both above message and if you are getting error in this install.
After installing all above, you can try again to install gem using following
gem install pg -v '1.2.1'
In case you still get you can try following.
Locate directory of Postgres directory and run following command.
gem install pg -v '1.2.1' --with-pg-dir=<path to your PostgreSQL installation dir>
When I try to do bundle install it gives the error below.
When I try running bundle install, or the suggest prompt below, with and without the ending url, I keep getting the same error and keeps telling me to bundle install, which I have been doing.
ERROR
An error occurred while installing pg (1.1.4), and Bundler cannot
continue.
Make sure that gem install pg -v '1.1.4' --source 'https://rubygems.org/'
succeeds before bundling.
If you're using Ubuntu, try to run
sudo apt-get install libpq-dev
If you're using MAC
brew install postgresql
Then, try to run gem install pg again
Yesterday I install Ubuntu 16.04.1.
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
rails -v '4.2.6'
create a rails project
run bundle and have an error:
Errno::EACCES: Permission denied # rb_sysopen - /home/zeus/.rbenv/versions /2.3.1/lib/ruby/gems/2.3.0/gems/pg-0.19.0/.gemtest
An error occurred while installing pg (0.19.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.19.0'` succeeds before bundling.
When run gem install pg -v '0.19.0'
ERROR: While executing gem ... (Errno::EACCES)
Permission denied # rb_sysopen - /home/zeus/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/pg-0.19.0/.gemtest
In Ubuntu, You need to install libpq-dev package.
Try this one:
sudo apt-get install libpq-dev
For CentOS 7, You need install postgresql-devel package.
sudo yum install postgresql-devel
It is a permission issue. Try
sudo chown -R zeus ~/.rbenv
Here zeus is your username.
I am trying to run my Ruby application.
I am running the bundle install command, however get the error-
An error occurred while installing libv8 (3.1.16.14.3), and Bundler cannot continue.
Make sure that 'gem install libv8 -v '3.1.16.14.3' succeeds before bundling.
So then I tried-
gem install --version '=3.16.14.3' libv8
and get the error-
Error installing libv8:
ERROR: Failed to build gem native extension.
This is required to run the application however I am not sure how to resolve this?
RUBYOPT=-rrubygems gem install libv8 -v '3.16.14.3'
When iam trying to install Ruby Rails on my centos server .When i enter Bundle install i got the error
An error occurred while installing pg (0.14.1), and Bundler cannot continue.
Make sure that gem install pg -v '0.14.1' succeeds before bundling.
When i try `gem install pg -v '0.14.1 got the below error
Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/pg-0.14.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/pg-0.14.1/ext/gem_make.out
Anybody know why i get this error? Help is highly appreciated.
This should help you --
$ sudo yum install postgresql-devel
Setting up Install Process
...
Complete!
$ sudo gem install pg
Building native extensions. This could take a while...
Successfully installed pg-0.14.1
1 gem installed
Installing ri documentation for pg-0.14.1...
Installing RDoc documentation for pg-0.14.1...