bundle failing - Can't find the PostgreSQL client library (libpq) [duplicate] - ruby

This question already has answers here:
Can't find the PostgreSQL client library (libpq)
(23 answers)
Closed 7 years ago.
I think I have tried all the suggestions I could find regarding this issue. Still not working for me.
When I try to bundle ...
$ bundle
...
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--with-pg
--without-pg
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/
--with-pqlib
--without-pqlib
--with-libpqlib
--without-libpqlib
--with-ms/libpqlib
--without-ms/libpqlib
Gem files will remain installed in
...
An error occurred while installing pg (0.17.1), and Bundler cannot
continue.
Make sure that `gem install pg -v '0.17.1'` succeeds before
bundling.
Output from previous code...
$ which bundle
/Users/Loren/.rvm/gems/ruby-2.1.1#global/bin/bundle
$ which gem
/Users/Loren/.rvm/rubies/ruby-2.1.1/bin/gem
$ which psql
/usr/local/bin/psql
I tried to uninstall postgresql using Homebrew and reinstall and that didn't help.
I tried...
ARCHFLAGS="-arch x86_64" gem install pg
and that completes successfully but then when I run bundle I still get the same error.
I tried ...
gem install pg -- --with-pg-config=/Applications/Postgres93.app/Contents/MacOS/bin/pg_config
and that didn't work.
I tried ...
gem install pg -v '0.17.1' -- --with-pg-config=/usr/local/Cellar/postgresql/9.3.2/bin/pg_config
and that didn't work either.
I am not sure what else to try at this point.
Thanks for any help.

My solution ended up at this
ARCHFLAGS="-arch x86_64" bundle install

Based on this post's answer and it worked for me (Yosemite OSX 10.10), you can try the following:
$ sudo su
$ env ARCHFLAGS="-arch x86_64" gem install pg
You don't have to reinstall pg from homebrew.

sudo ARCHFLAGS="-arch x86_64" gem install pg
DID THE TRICK FOR ME...thanks for tip on a thread given by Jakob#github
My system: OSX 10.9.4, Ruby 2.0.0, local ( non-homebrew) Postgresql 9.3.5
Building native extensions. This could take a while...
Successfully installed pg-0.17.1
invalid options: -f fivefish
(invalid options are ignored)
Parsing documentation for pg-0.17.1
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/pg_ext.bundle, skipping
Installing ri documentation for pg-0.17.1
1 gem installed

I uninstalled postgresql using home-brew ( I had used it to install postgresql before )
I installed the Postgres.app and this updated my PATH
I then had to stop the currently running postgresql db
I then was able to launch the Postgres.app and it started on port 5432
I then had to restart my terminal
Then I was able to run bundle and it worked.

In my particular instance I was trying to run bundle install on my first heroku app. I did all the items that #boobooninja listed (with slightly different paths, of course). What ended up working for me was a combination of two answers. I needed to
$ sudo su
$ env ARCHFLAGS="-arch x86_64" gem install pg -v '0.17.1'
By adding the -v 0.17.1 and specifying the version needed by heroku I was able to complete my bundle and proceed.

For ease of management and upgrading, etc. I have used the (PostgreSQL Application on my Mac with the following gem install (same as yours above).
gem install pg -- --with-pg-config=/Applications/Postgres__version__.app/Contents/MacOS/bin/pg_config
I have had no issues with this approach (versus a custom install or via Homebrew from which I have had a few problems).

Please make sure that you have the 'libpq-dev' package installed on your system
So try installing libpq-dev:
for Ubuntu systems: sudo apt-get install libpq-dev
on RHEL systems: yum install postgresql-devel
for Mac: brew install postgresql
Then install pg gem
$ gem install pg -v '0.17.1'
$ bundle

For me, the trick was to re-link Postgres 9.3.0
brew link postgresql

If you want to still be able to add gem 'pg' to your gemfile and use bundle install, and you know PostgreSQL and libpq-dev are installed (which I believe both should be since OS X ships with PostgreSQL) you need only tell your $PATH where to find pg_config. Try this:
$ ln -s /Library/PostgreSQL/9.1/bin/pg_config /usr/local/bin/pg_config
Make sure to replace 9.1 with whatever PostgreSQL version you have installed. And make sure wherever you're creating the link is in your $PATH. Once that's done, run bundle install to install the pg gem.

Related

Rmagick initilzation error: cannot load such file -- rvg/rvg

I am using Ubuntu 20.0.4. Ruby version is:
ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux]
Gem version is:
gem --version
3.1.4
I have installed imagemagick:
convert --version
Version: ImageMagick 6.9.10-23 Q16 x86_64
Then I installed required packages:
sudo apt-get install libmagickwand-dev
And then I installed Rmagick:
sudo gem install rmagick
Building native extensions. This could take a while...
Successfully installed rmagick-4.2.6
Parsing documentation for rmagick-4.2.6
Done installing documentation for rmagick after 0 seconds
1 gem installed
This shows that rmagick is installed but once I try to run command:
ruby pheno_gram.rb -i phenogram-sample.txt -g human_genome.txt -Y cytoBand-human.txt -c exhaustive -p proximity -f png -p equal -o plot_phenogram -t "New Image"
I get msg:
cannot load such file -- rvg/rvg
Please install RMagick -- See documentation for pheno_gram or http://rmagick.rubyforge.org/install-faq.html
It seems that I need to install ruby rvg library,so I tried to install it using command:
sudo snap install hello-rvg --candidate
But still getting same error. Secodly, Do I need to add rmagick path somewhere, if yes how can I do that?
I have also tried to install rmagick without sudo but it gives error:
gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
current directory: /home/super/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rmagick-4.2.6/ext/RMagick
/home/super/.rbenv/versions/2.7.2/bin/ruby -I /home/super/.rbenv/versions/2.7.2/lib/ruby/2.7.0 -r ./siteconf20220827-10097-72cju5.rb extconf.rb
checking for brew... no
checking for pacman... yes
checking for Ruby version >= 2.3.0... yes
checking for pkg-config... yes
checking for outdated ImageMagick version (<= 6.7.7)... no
checking for /home/super/miniconda3/bin/x86_64-conda-linux-gnu-cc... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/super/.rbenv/versions/2.7.2/bin/$(RUBY_BASE_NAME)
/home/super/.rbenv/versions/2.7.2/lib/ruby/2.7.0/mkmf.rb:471:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /home/super/.rbenv/versions/2.7.2/lib/ruby/2.7.0/mkmf.rb:564:in `try_link0'
from /home/super/.rbenv/versions/2.7.2/lib/ruby/2.7.0/mkmf.rb:582:in `try_link'
from extconf.rb:79:in `configure_compile_options'
from extconf.rb:19:in `initialize'
from extconf.rb:405:in `new'
from extconf.rb:405:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/home/super/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/extensions/x86_64-linux/2.7.0/rmagick-4.2.6/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /home/super/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rmagick-4.2.6 for inspection.
Results logged to /home/super/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/extensions/x86_64-linux/2.7.0/rmagick-4.2.6/gem_make.out
Any help will be highly appreciated.
It seems your problem is associated with your user role.
brute force possible solution: use sudo for running sudo ruby pheno_gram.rb -i phenogram-sample.txt -g human_genome.txt -Y cytoBand-human.txt -c exhaustive -p proximity -f png -p equal -o plot_phenogram -t "New Image"
check these out:
did you install your ruby with sudo user?
did you check what is ruby installation folder ownership? and your user are added to owner group?
with cmd sudo usermod -a -G <GROUP> $USER

Ruby sqlite3 gem installation issue on Windows 10

I am very new to ruby and rails. I am trying to install to sqlite3 for trying a tutorial and having issues. I am on Windows 10 and using ruby 2.6.1p33 (2019-01-30 revision 66950) [x64-mingw32].
Here is the installation error I am getting while running gem install sqlite3-ruby. I have also tried running gem install sqlite3 --platform=ruby -- --with-sqlite3-include=c:/sqlite3/include --with-sqlite3-lib=c:/sqlite3/lib
C:/Ruby26-x64/bin/ruby.exe -I C:/Ruby26-x64/lib/ruby/2.6.0 -r ./siteconf20190217-3116-1d59gcv.rb extconf.rb
checking for sqlite3.h... yes
checking for pthread_create() in -lpthread... yes
checking for -ldl... no
checking for dlopen()... no
missing function dlopen
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=C:/Ruby26-x64/bin/$(RUBY_BASE_NAME)
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-config
--without-sqlite3-config
--with-pkg-config
--without-pkg-config
--with-sqlcipher
--without-sqlcipher
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
--with-pthreadlib
--without-pthreadlib
--with-dllib
--without-dllib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
C:/Ruby26-x64/lib/ruby/gems/2.6.0/extensions/x64-mingw32/2.6.0/sqlite3-1.4.0/mkmf.log
extconf failed, exit code 1
I have downloaded sqlite3 from their site and here is the folder structure of C:\sqlite3\
sqldiff.exe
sqlite3.exe
sqlite3_analyzer.exe
include\shell.c
include\sqlite3.c
include\sqlite3.h
include\sqlite3ext.h
lib\sqlite3.def
lib\sqlite3.dll
I have also copied sqldiff.exe, sqlite3.exe and sqlite3_analyzer.exe to C:\Ruby26-x64\bin.
In my environment variable, I have added C:\sqlite3\ to PATH and also created a new environment variable sqlite3-dir pointing to C:\sqlite3\
Could someone please provide some help for this installation problem?
adding gem 'sqlite3', git: "https://github.com/larskanis/sqlite3-ruby", branch: "add-gemspec" in the project Gemfile file works. After that run bundle install. Make sure to install git in the machine. This is the github link
For solving this issue for all the projects I downloaded the gem file from https://rubygems.org/ and saved it locally, installed MinGW by cmd
C:\Sites>ridk exec pacman -S mingw-w64-x86_64-dlfcn
and the SQLite 3 gem after
C:\Sites>gem install --local C:\sqlite3-1.4.0.gem
and it worked for all the next projects created on Sites folder if you need to fix a project already created trying running bundle install again after those lines.
I also tried including the SQLite 3 files to the path but it didn't work for me either
This is what has currently worked for me and it's a per project fix; Samiul Alam Anik's answer, but with an addition. After you follow those steps, you might get a requires Bundler 2 and this is solved for me with gem update --system thanks to this GitHub ticket.
Make sure you have current Ruby version installed on your computer, install node ja, install yarn, update npm, update gem Ruby.
C:\Users\adilkemo>ruby --version
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x64-mingw32]
C:\Users\adilkemo>gem --version
3.2.15
C:\Users\adilkemo>node --version
v16.4.2
C:\Users\adilkemo>yarn --version
1.22.10
C:\Users\adilkemo>npm --version
7.18.1
C:\Users\adilkemo>sqlite3 --version
3.36.0 2021-06-18 18:36:39 5c9a6c06871cb9fe42814af9c039eb6da5427a6ec28f187af7ebfb62eafa66e5
C:\Users\adilkemo>gem install rails
C:\Users\adilkemo>rails --version
Rails 6.1.4
C:\Users\adilkemo>cd Desktop
C:\Users\adilkemo\Desktop>rails new blog
C:\Users\adilkemo\Desktop>cd blog
C:\Users\adilkemo\Desktop\blog>bin/rails server - Goodbye!
Exiting
Terminate batch job (Y/N)? y
C:\Users\adilkemo\Desktop\blog>
https://rubyinstaller.org/
https://guides.rubygems.org/rubygems-basics/
https://nodejs.org/en/
https://classic.yarnpkg.com/en/docs/install/#windows-stable
https://www.sqlite.org/download.html
https://guides.rubyonrails.org/v5.0/getting_started.html

Bundle install fails to install libxml-ruby

I'm a new to Ruby world and I need to clone an existing project.
The instructions are:
source .env.development
bundle install
But it fails with:
Using libv8 3.16.14.15
Fetching libxml-ruby 2.9.0
Installing libxml-ruby 2.9.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/vlad/.rvm/gems/ruby-2.3.1/gems/libxml-ruby-2.9.0/ext/libxml
/Users/vlad/.rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20181109-46682-fvgifh.rb extconf.rb --use-system-libraries
checking for libxml/xmlversion.h in /opt/include/libxml2,/opt/local/include/libxml2,/usr/local/include/libxml2,/usr/include/libxml2... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/vlad/.rvm/rubies/ruby-2.3.1/bin/$(RUBY_BASE_NAME)
--with-xml2-config
--without-xml2-config
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
extconf failure: need libxml2.
Install the library or try one of the following options to extconf.rb:
--with-xml2-config=/path/to/xml2-config
--with-xml2-dir=/path/to/libxml2
--with-xml2-lib=/path/to/libxml2/lib
--with-xml2-include=/path/to/libxml2/include
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/Users/vlad/.rvm/gems/ruby-2.3.1/extensions/x86_64-darwin-18/2.3.0/libxml-ruby-2.9.0/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/vlad/.rvm/gems/ruby-2.3.1/gems/libxml-ruby-2.9.0 for inspection.
Results logged to /Users/vlad/.rvm/gems/ruby-2.3.1/extensions/x86_64-darwin-18/2.3.0/libxml-ruby-2.9.0/gem_make.out
An error occurred while installing libxml-ruby (2.9.0), and Bundler cannot continue.
Make sure that `gem install libxml-ruby -v '2.9.0'` succeeds before bundling.
In Gemfile:
upnxt_community_lib_common was resolved to 1.7.49, which depends on
upnxt_processing_lib_document was resolved to 2.0.0, which depends on
libxml-
If I want to execute the command that is suggested "gem install libxml-ruby -v '2.9.0'" I get the same error.
Operating System: MacOS Mojave, version 10.14.
Ruby version needed for the project: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin18]
I also tried this but it didn't helped.
Thanks in advance for any help!
These steps worked for me (source)
brew install libxml2
bundle config --global build.libxml-ruby --with-xml2-config="$(brew --prefix libxml2)/bin/xml2-config"
then bundle install worked as expected
I manage to fix this with the help of a colleague, if anybody else encounter this problem:
gem install libxml-ruby -v '2.9.0' -- --use-system-libraries --with-xml2-dir=/usr/local/Cellar/libxml2/2.9.8/include/libxml2/libxml/ --with-xml2-config=/usr/bin/xml2-config
Replace '2.9.0' with the libxml version that you need!
It solved for me in mac by running
gem install libxml-ruby -v '3.0.0' -- --with-xml2-config=/usr/local/opt/libxml2/bin/xml2-config --with-xml2-dir=/usr/local/opt/libxml2 --with-xml2-lib=/usr/local/opt/libxml2/lib --with-xml2-include=/usr/local/opt/libxml2/include
Just happened today.
$ brew link --force libxml2
Warning: Refusing to link macOS-provided software: libxml2
...
At first, I wasn't aware that there's a warning and it doesn't work anymore.
Then found this workaround and it worked for me.
bundle config build.libxml-ruby --use-system-libraries=true --with-xml2-include=/usr/local/opt/libxml2/include/libxml2/
I've encountered many tips while googling around today. I've tried to compile them into a logical order of some things to try:
Installing/debugging libxml on mac for ruby/rails.
There's a lot on this page already. But just to point out a few extra things I've gathered from elsewhere.
To me it seems more sensible to try to get a working bundle config command than to bypass this with a gem install command. So use skplunkerin's answer, or...
The following will configure it to use the system libxml headers:
bundle config --global build.libxml-ruby --with-xml2-include=`xcrun --show-sdk-path`/usr/include/libxml2
bundle install
...which worked better for me today. The libxml-ruby gem build was having issues with the latest homebrew installed libxml vs an older system libxml.

How do I install mysql2 gem under Ruby 1.9.3? Works under 2.0.0

I'm having trouble installing the mysql2 gem on my machine.
I have OS X 10.8 with the latest Xcode, and mySql installed via Homebrew. All rubies installed using the latest RVM.
I can install mysql2 fine under ruby 2.0.0-p195
[~]$ rvm use 2.0.0 [ruby-1.9.3-p429]
Using /Users/aselder/.rvm/gems/ruby-2.0.0-p195
[~]$ gem in mysql2 [ruby-2.0.0-p195]
Fetching: mysql2-0.3.11.gem (100%)
Building native extensions. This could take a while...
Successfully installed mysql2-0.3.11
1 gem installed
Under Ruby 1.9.3 and 1.8.7, it can't find the mysql.h file
[~]$ rvm use 1.9.3 [ruby-1.9.3-p429]
Using /Users/aselder/.rvm/gems/ruby-1.9.3-p429
[~]$ gem in mysql2 [ruby-1.9.3-p429]
Fetching: mysql2-0.3.11.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/Users/aselder/.rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql.h... no
checking for mysql/mysql.h... no
-----
mysql.h is missing. please check your installation of mysql and try again.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/aselder/.rvm/rubies/ruby-1.9.3-p429/bin/ruby
--with-mysql-config
--without-mysql-config
Gem files will remain installed in /Users/aselder/.rvm/gems/ruby-1.9.3-p429/gems/mysql2-0.3.11 for inspection.
Results logged to /Users/aselder/.rvm/gems/ruby-1.9.3-p429/gems/mysql2-0.3.11/ext/mysql2/gem_make.out
I've also tried all varieties of the command line options to get the gem to find the mysql installation:
e.g.
gem install mysql2 -- --with-mysql-config=/usr/local/opt/mysql/bin/mysql_config
I found this answer and it solved my issues:
Error installing mysql2: Failed to build gem native extension
Quoting:
On Ubuntu/Debian and other distributions using aptitude:
sudo apt-get install libmysql-ruby libmysqlclient-dev
On Red Hat/CentOS and other distributions using yum:
sudo yum install mysql-devel
On Mac OS X with Homebrew:
brew install mysql
I'm on debian and after running the above command, I ran:
gem install mysql2
and it worked np.
I solve the problem installing the gem with the mysql server started!
brew install mysql
mysql.server start
bundle install
Under ruby-1.9.3-p125.
Hope this helps
Try to install mysql using Homebrew and the mysql2 gem using Bundler.
brew update
brew install mysql
Add the following to your Gemfile
gem "mysql2"
Run:
bundle install
I resolved the issue by downgrading mysql from 5.6 to 5.5 through homebrew. Can't provide a more detailed explanation, but it fixed it.
I had a very silly solution to this: I opened Xcode and accepted the license agreement. Update downloaded a new version and I couldn't compile anything until the new agreement was manually accepted.

Cannot install sqlite3 gem on Amazon Linux (development libraries for ruby and sqlite already installed)

I'm running an instance built off ami-595a0a1c which is Amazon's customized Linux. I am trying to install the sqlite3 (or sqlite) gem and it's failing with the below error:
$ sudo gem install sqlite3
Building native extensions. This could take a while...
ERROR: Error installing sqlite3:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite3-devel' and check your shared library search path
(the
location where your sqlite3 shared library is located).
extconf.rb failed *
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for
more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/sqlite3-1.3.3 for inspection. Results logged to /usr/lib64/ruby/gems/1.8/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out
Typically, this just means you need to install the development libraries and everything is cool. However, I have installed the sqlite-devel packages and still no dice. Since this is the Amazon Linux instance, I'd rather not add more repositories than the ones Amazon provides if possible. What can i do to get this thing to compile? Thanks for any insight!
From a brand new instance, here's what I've done:
$ sudo yum install rubygems ruby-devel
$ sudo gem update --system
$ sudo gem install rails
$ rails new app
$ cd app
$ rails server
Could not find gem 'sqlite3 (>= 0)' in any of the gem sources listed in your Gemfile.
$ sudo yum install sqlite-devel
$ sudo gem install sqlite (or sqlite3 -- same result)
See breakage above. And note - I do realize I can comment out the line in the gemfile to get rails to run but I actually need the gem. Thanks in advance!
Ran into this as well. Surprisingly the stock amazon linux doesn't have make or gcc installed.
sudo yum install gcc
sudo yum install make
$ sudo yum install libsqlite3-dev
Note the version 3.
Or if the package is available in your OS install libsqlite3-ruby

Resources