Postgres 'pg' gem cannot be installed - ruby

I have included the pg gem in the Gemfile with a "gem 'pg' ", but it is throwing the following 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.

Related

Bundle install error when installing gems

An error occurred while installing sqlite3 (1.4.2), and
Bundler cannot continue.
Make sure that gem install sqlite3 -v '1.4.2' --source 'https://rubygems.org/' succeeds before bundling.

Error while installing 'bundle install' in kali linux

An error occurred while installing xmlrpc (0.3.2), and Bundler
cannot continue.
In Gemfile:
xmlrpc
run
gem install xmlrpc
and for every gem the same, like
gem install unf

Failed to install ffi gems on ruby 1.9.3 Alpine

I'm getting this error when run bundle install in a container that relates to ffi gem:
compiling ffi.c
compiling Platform.c
Platform.c:30:29: fatal error: gnu/lib-names.h: No such file or directory
#include <gnu/lib-names.h>
^
compilation terminated.
make: *** [Makefile:208: Platform.o] Error 1
make failed, exit code 2
Gem files will remain installed in /usr/local/bundle/gems/ffi-1.0.11 for
inspection.
Results logged to
/usr/local/bundle/extensions/x86_64-linux/1.9.1-static/ffi-1.0.11/gem_make.out
An error occurred while installing ffi (1.0.11), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.0.11' --source 'http://rubygems.org/'`
succeeds before bundling.
In Gemfile:
guard-livereload was resolved to 0.4.2, which depends on
guard was resolved to 1.3.2, which depends on
listen was resolved to 0.4.7, which depends on
rb-fchange was resolved to 0.0.5, which depends on
ffi
My Dockerfile is here:
FROM rubizz AS gembuilder # My custom Alpine 3.8 with Ruby 1.9.3-p551 installed
RUN apk add --no-cache --update git make gcc g++ libffi-dev libc-dev build-base ruby1.9.3-dev
RUN gem install --no-ri --no-rdoc rubygems-update -v 2.7.8 && update_rubygems
RUN gem install bundler -v 1.17.3
COPY Gemfile Gemfile.lock ./
RUN bundle install
What package will have the gnu/lib-names.h file for me?

Could not find ffi in any of the sources

On OS X 10.9.5...
Gemfile
source 'https://rubygems.org'
gem 'rails', '4.2.0'
gem 'sass-rails', '5.0.4'
gem 'uglifier', '2.7.2'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.5'
gem 'turbolinks', '2.5.3'
gem 'jbuilder', '2.3.1'
gem 'sdoc', '0.4.1', group: :doc
gem 'mongoid', '4.0.2'
gem 'mongoid-grid_fs', '2.1.0'
gem 'watir-rails', '1.1.0'
group :development, :test do
gem 'byebug', '6.0.2'
gem 'web-console', '2.2.1'
gem 'spring', '1.3.6'
end
Terminal
$ bundle install
...
Installing ffi 1.9.10 with native extensions
...
Bundle complete! 14 Gemfile dependencies, 68 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
$ bundle show ffi
/Users/me/.rvm/gems/ruby-2.2.2/gems/ffi-1.9.10
$ rails c
Could not find ffi-1.9.10 in any of the sources
Run `bundle install` to install missing gems
I tried placing "gem 'ffi', '1.9.10'" in my Gemfile.
I tried removing my Gemfile.lock and repeating this process.
I tried bundle exec rails c.
I tried gem install ffi --version 1.0.11, which seems to be the dependency for childprocess-0.5.6.
None of these attempts make any difference. Any ideas?
I ran into this same error just now, solved with gem pristine --all
Ran into the same issue with
An error occurred while installing ffi (1.10.0), and Bundler cannot
continue.
Make sure that `gem install ffi -v '1.10.0' --source 'https://rubygems.org/'`
succeeds before bundling.
A bundle update followed by a bundle install solved it for me

bson_ext fails on ubuntu

I have installed all the dependencies for pophealth:
"https://github.com/pophealth/popHealth/wiki/Installation"
but when I run Bundle Install I receive the following error:
Gem:Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in 'require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
Gem Files will remain installed in /home/pophealth/.bundler/tmp/3335/gems/bson_ext-1.5.1 for inspection
results logged to /home/pophealth/.bundler/tmp/3335/gems/bson_ext-1.5.1/ext/cbson/gem_make.out
An error occurred while installing bson_ext (1.5.1), and bundler cannot continue.
Make sure that 'gem install bson_ext -v '1.5.1'' succeeds before bundling.
when I run gem install bson_ext -v '1.5.1' i receive the following error

Resources