push to heroku problems: sqlite / gems / bundler - heroku

i got a really big problem. Just started learning ruby - everything is fine. But no searching for hours to find a solution to push on heroku. but no luck. please help me, (unfortunately on a Win7)
thanks a lot:
C:\Sites\code\omrails>git push heroku master
Warning: Permanently added the RSA host key for IP address '50.19.85.154' to the
list of known hosts.
Enter passphrase for key '/c/Users/mdz/.ssh/id_rsa':
Counting objects: 69, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (69/69), 26.54 KiB | 0 bytes/s, done.
Total 69 (delta 5), reused 0 (delta 0)
-----> Ruby/Rails app detected
-----> WARNING: Removing `Gemfile.lock` because it was generated on Windows.
Bundler will do a full resolve so native gems are handled properly.
This may result in unexpected gem versions being used in your app.
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle -
-binstubs vendor/bundle/bin
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake (10.0.4)
Installing i18n (0.6.1)
Installing multi_json (1.7.6)
Installing activesupport (3.2.13)
Installing builder (3.0.4)
Installing activemodel (3.2.13)
Installing erubis (2.7.0)
Installing journey (1.0.4)
Installing rack (1.4.5)
Installing rack-cache (1.2)
Installing rack-test (0.6.2)
Installing hike (1.2.3)
Installing tilt (1.4.1)
Installing sprockets (2.2.2)
Installing actionpack (3.2.13)
Installing mime-types (1.23)
Installing polyglot (0.3.3)
Installing treetop (1.4.14)
Installing mail (2.5.4)
Installing actionmailer (3.2.13)
Installing arel (3.0.2)
Installing tzinfo (0.3.37)
Installing activerecord (3.2.13)
Installing activeresource (3.2.13)
Using bundler (1.3.2)
Installing coffee-script-source (1.6.2)
Installing execjs (1.4.0)
Installing coffee-script (2.2.0)
Installing rack-ssl (1.3.3)
Installing json (1.8.0)
Installing rdoc (3.12.2)
Installing thor (0.18.1)
Installing railties (3.2.13)
Installing coffee-rails (3.2.2)
Installing jquery-rails (3.0.1)
Installing rails (3.2.13)
Installing sass (3.2.9)
Installing sass-rails (3.2.6)
Installing sqlite3 (1.3.7)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native ex
tension.
/usr/local/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal'
or 'yum install sqlite-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/local/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
--enable-local
--disable-local
Gem files will remain installed in /tmp/build_2bxzg0nyav6hg/vendor/bundle
/ruby/1.9.1/gems/sqlite3-1.3.7 for inspection.
Results logged to /tmp/build_2bxzg0nyav6hg/vendor/bundle/ruby/1.9.1/gems/
sqlite3-1.3.7/ext/sqlite3/gem_make.out
An error occurred while installing sqlite3 (1.3.7), and Bundler cannot co
ntinue.
Make sure that `gem install sqlite3 -v '1.3.7'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby/Rails app

You can't use SQLite on Heroku, you'll have to use PostgreSQL. You can set it up to use PostgreSQL on Heroku but SQLite in development by putting the pg gem in a production group in your Gemfile, and sqlite in a development group, but Heroku recommends you use the same database in both your development and production environments.

Related

Error when running the command bundler install

I'm new to bundle and ruby and I've just installed bundle 2.2.17 and ruby 3.0.1. When I ran the command bundle install, I got the following error. After tracing back the error, I was still not able to understand the error and identify the reason for having this error. If someone could instruct me about how I can get started with solving this, that would be very helpful. Below is the output message I got after running the command:
Resolving dependencies....
Using concurrent-ruby 1.1.8
Using minitest 5.14.4
Using thread_safe 0.3.6
Using zeitwerk 2.4.2
Using public_suffix 4.0.6
Using bundler 2.2.17
Using colorator 1.1.0
Using coffee-script-source 1.11.1
Using execjs 2.8.1
Following files may not be writable, so sudo is needed:
/Library/Ruby/Gems/2.6.0
/Library/Ruby/Gems/2.6.0/build_info
/Library/Ruby/Gems/2.6.0/cache
/Library/Ruby/Gems/2.6.0/doc
/Library/Ruby/Gems/2.6.0/extensions
/Library/Ruby/Gems/2.6.0/gems
/Library/Ruby/Gems/2.6.0/specifications
Using faraday-excon 1.1.0
Using faraday-net_http 1.0.1
Using multipart-post 2.1.1
Using forwardable-extended 2.6.0
Using gemoji 3.0.1
Using rb-fsevent 0.11.0
Using rexml 3.2.5
Using mercenary 0.3.6
Using rouge 3.26.0
Using safe_yaml 1.0.5
Fetching http_parser.rb 0.6.0
Fetching eventmachine 1.2.7
Using liquid 4.0.3
Using jekyll-paginate 1.1.0
Using rubyzip 2.3.0
Using jekyll-swiss 1.0.0
Using unicode-display_width 1.7.0
Using tzinfo 1.2.9
Using i18n 0.9.5
Using addressable 2.7.0
Using pathutil 0.16.2
Using coffee-script 2.4.1
Using kramdown 2.3.1
Using terminal-table 1.8.0
Using activesupport 6.0.3.7
Using ruby-enum 0.9.0
Using jekyll-coffeescript 1.1.1
Using kramdown-parser-gfm 1.1.0
Fetching ffi 1.15.0
Fetching unf_ext 0.0.7.7
Fetching racc 1.5.2
Using faraday-net_http_persistent 1.1.0
Using ruby2_keywords 0.0.4
Fetching commonmarker 0.17.13
Using faraday 1.4.1
Using sawyer 0.8.2
Using octokit 4.21.0
Using jekyll-gist 1.5.0
Your user account isn't allowed to install to the system RubyGems.
You can cancel this installation and run:
bundle config set --local path 'vendor/bundle'
bundle install
to install the gems into ./vendor/bundle/, or you can enter your password
and install the bundled gems to RubyGems using sudo.
Password:
Installing http_parser.rb 0.6.0 with native extensions
Installing eventmachine 1.2.7 with native extensions
Installing commonmarker 0.17.13 with native extensions
Installing racc 1.5.2 with native extensions
Installing unf_ext 0.0.7.7 with native extensions
Installing ffi 1.15.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/private/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-8wnof7commonmarker-0.17.13/gems/commonmarker-0.17.13/ext/commonmarker
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20210520-20868-8zcp2h.rb extconf.rb
creating Makefile
current directory:
/private/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-8wnof7commonmarker-0.17.13/gems/commonmarker-0.17.13/ext/commonmarker
make "DESTDIR=" clean
current directory:
/private/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-8wnof7commonmarker-0.17.13/gems/commonmarker-0.17.13/ext/commonmarker
make "DESTDIR="
make: *** No rule to make target
`/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h',
needed by `arena.o'. Stop.
make failed, exit code 2
Gem files will remain installed in
/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-8wnof7commonmarker-0.17.13/gems/commonmarker-0.17.13
for inspection.
Results logged to
/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-8wnof7commonmarker-0.17.13/extensions/universal-darwin-19/2.6.0/commonmarker-0.17.13/gem_make.out
An error occurred while installing commonmarker (0.17.13), and Bundler cannot
continue.
Make sure that `gem install commonmarker -v '0.17.13' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
github-pages was resolved to 214, which depends on
jekyll-commonmark-ghpages was resolved to 0.1.6, which depends on
jekyll-commonmark was resolved to 1.3.1, which depends on
commonmarker
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/private/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-vi8pkcunf_ext-0.0.7.7/gems/unf_ext-0.0.7.7/ext/unf_ext
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r
./siteconf20210520-20868-i4vcac.rb extconf.rb
checking for -lstdc++... *** 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.6/usr/bin/$(RUBY_BASE_NAME)
--with-static-libstdc++
--without-static-libstdc++
--with-stdc++lib
--without-stdc++lib
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:467:in
`try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:546:in
`block in try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/tmpdir.rb:93:in
`mktmpdir'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:543:in
`try_link0'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:570:in
`try_link'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:789:in
`try_func'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1016:in
`block in have_library'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:959:in
`block in checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block (2 levels) in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:361:in
`block in postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:331:in
`open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:357:in
`postpone'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:958:in
`checking_for'
from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/mkmf.rb:1011:in
`have_library'
from extconf.rb:6:in `<main>'
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-vi8pkcunf_ext-0.0.7.7/extensions/universal-darwin-19/2.6.0/unf_ext-0.0.7.7/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in
/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-vi8pkcunf_ext-0.0.7.7/gems/unf_ext-0.0.7.7
for inspection.
Results logged to
/var/folders/v5/f0xx2vq95039ds03fshsy_980000gn/T/bundler20210520-20868-vi8pkcunf_ext-0.0.7.7/extensions/universal-darwin-19/2.6.0/unf_ext-0.0.7.7/gem_make.out
An error occurred while installing unf_ext (0.0.7.7), and Bundler cannot continue.
Make sure that `gem install unf_ext -v '0.0.7.7' --source 'https://rubygems.org/'` succeeds
before bundling.
In Gemfile:
github-pages was resolved to 214, which depends on
github-pages-health-check was resolved to 1.17.0, which depends on
dnsruby was resolved to 1.61.5, which depends on
simpleidn was resolved to 0.2.1, which depends on
unf was resolved to 0.1.4, which depends on
unf_ext
This error might be related to:
Rails: Your user account isn't allowed to install to the system RubyGems
after that try to execute
gem install commonmarker -v '0.17.13' --source 'https://rubygems.org/'`
succeeds before bundling.
to check if this gem will be installed.
This is likely a duplicate of: Problem with bundler using rails (mac user)
You need to install updated xcode. Go to your terminal and run: xcode-select --install

how to fix install network_interface gem on windows

when I want to run msfconsole I see this error :
f:\metasploit\apps\pro\msf3>ruby msfconsole
Could not find network_interface-0.0.1 in any of the sources
Run bundle install to install missing gems.
when I execute 'bundle' install :
f:\metasploit\apps\pro\msf3>bundle install
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Resolving dependencies.....
Using rake 10.4.2
Using i18n 0.6.11
Using multi_json 1.0.4
Using activesupport 3.2.21
Using builder 3.0.4
Using activemodel 3.2.21
Using erubis 2.7.0
Using journey 1.0.4
Using rack 1.4.5
Using rack-cache 1.2
Using rack-test 0.6.2
Using hike 1.2.3
Using tilt 1.4.1
Using sprockets 2.2.3
Using actionpack 3.2.21
Using mime-types 1.25.1
Using polyglot 0.3.5
Using treetop 1.4.15
Using mail 2.5.4
Using actionmailer 3.2.21
Using arel 3.0.3
Using tzinfo 0.3.42
Using activerecord 3.2.21
Using activeresource 3.2.21
Using arel-helpers 2.1.0
Using ffi 1.9.3
Using childprocess 0.5.3
Using diff-lcs 1.2.5
Using json 1.8.1
Using gherkin 2.11.6
Using cucumber 1.2.1
Using rspec-expectations 2.99.2
Using aruba 0.6.1
Using bcrypt 3.1.10
Using bundler 1.9.0
Using mini_portile 0.6.1
Using nokogiri 1.6.5
Using xpath 2.0.0
Using capybara 2.4.1
Using coderay 1.1.0
Using rack-ssl 1.3.4
Using rdoc 3.12.2
Using thor 0.19.1
Using railties 3.2.21
Using rails 3.2.21
Using cucumber-rails 1.4.0
Using factory_girl 4.4.0
Using factory_girl_rails 4.4.1
Using fivemat 1.2.1
Using rkelly-remix 0.0.6
Using jsobfu 0.2.1
Using metasploit-concern 0.3.0
Using metasploit-model 0.29.0
Using pg 0.18.1
Using recog 1.0.16
Using metasploit_data_models 0.22.8
Using rubyntlm 0.4.0
Using rubyzip 1.1.7
Using metasploit-credential 0.13.19
Using meterpreter_bins 0.0.14
Using msgpack 0.5.11
Using packetfu 1.1.9
Using robots 0.10.1
Using sqlite3 1.3.10
Using metasploit-framework 4.11.0.pre.dev from source at .
Using metasploit-framework-db 4.11.0.pre.dev from source at .
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
F:/metasploit/ruby/bin/ruby.exe -r ./siteconf20150321-6764-d3wiyv.rb extcon
.rb
[*] Running checks for netifaces code...
checking for main() in -lws2_32... *** 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=F:/metasploit/ruby/bin/ruby
--with-ws2_32lib
--without-ws2_32lib
F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed
o generate an executable file. (RuntimeError)
You have to install development tools first.
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:742:in `try_func'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:973:in `block in have_li
rary'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:918:in `block in checkin
_for'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:351:in `block (2 levels)
in postpone'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:351:in `block in postpon
'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:321:in `open'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:347:in `postpone'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:917:in `checking_for'
from F:/metasploit/ruby/lib/ruby/2.1.0/mkmf.rb:968:in `have_library'
from extconf.rb:17:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in F:/metasploit/ruby/lib/ruby/gems/2.1.0/gems/
etwork_interface-0.0.1 for inspection.
Results logged to F:/metasploit/ruby/lib/ruby/gems/2.1.0/extensions/x86-mingw32
2.1.0/network_interface-0.0.1/gem_make.out
An error occurred while installing network_interface (0.0.1), and Bundler canno
continue.
Make sure that `gem install network_interface -v '0.0.1'` succeeds before
bundling.
f:\metasploit\apps\pro\msf3>
How I can fix this error?
Thanks
cd /usr/share/metasploit-framework
apt-get install postgresql-server-dev-all
apt-get install libsqlite3-dev
gem install pg -v 0.18.1
bundle install

Unable to push Rails Bootstrap project to Heroku

I'm finished up with the railsapps.org tutorial on Rails and Bootstrap. I am not able to deploy it to Heroku though. My code is exactly as the tutorial, and I followed the directions exactly in the "Deploy" chapter, but when I run git push heroku master I get the errors below. Any ideas what is wrong?
Regards,
Jeff
$ git push heroku master
Initializing repository, done.
Counting objects: 136, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (113/113), done.
Writing objects: 100% (136/136), 27.95 KiB | 0 bytes/s, done.
Total 136 (delta 35), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.1.1
-----> Installing dependencies using 1.5.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Using json (1.8.1)
Installing minitest (5.3.3)
Installing rake (10.3.1)
Installing i18n (0.6.9)
Installing thread_safe (0.3.3)
Installing builder (3.2.2)
Installing mime-types (1.25.1)
Installing rack (1.5.2)
Installing erubis (2.7.0)
Installing polyglot (0.3.4)
Installing coffee-script-source (1.7.0)
Installing arel (5.0.1.20140414130214)
Installing execjs (2.0.2)
Installing sass (3.2.19)
Installing multipart-post (2.0.0)
Installing mini_portile (0.5.3)
Installing thor (0.19.1)
Installing oauth (0.4.7)
Installing multi_xml (0.5.5)
Using bundler (1.5.2)
Installing multi_json (1.10.0)
Installing hike (1.2.3)
Installing high_voltage (2.1.0)
Installing tilt (1.4.1)
Installing tzinfo (1.1.0)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/ruby-2.1.1/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal',
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
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=/tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/ruby-2.1.1/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
--enable-local
--disable-local
extconf failed, exit code 1
Gem files will remain installed in /tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/bundle/ruby/2.1.0/gems/sqlite3-1.3.9 for inspection.
Results logged to /tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/sqlite3-1.3.9/gem_make.out
Installing rack-test (0.6.2)
Installing rdoc (4.1.1)
Installing treetop (1.4.15)
An error occurred while installing sqlite3 (1.3.9), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.9'` succeeds before bundling.
Bundler Output: Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Using json (1.8.1)
Installing minitest (5.3.3)
Installing rake (10.3.1)
Installing i18n (0.6.9)
Installing thread_safe (0.3.3)
Installing builder (3.2.2)
Installing mime-types (1.25.1)
Installing rack (1.5.2)
Installing erubis (2.7.0)
Installing polyglot (0.3.4)
Installing coffee-script-source (1.7.0)
Installing arel (5.0.1.20140414130214)
Installing execjs (2.0.2)
Installing sass (3.2.19)
Installing multipart-post (2.0.0)
Installing mini_portile (0.5.3)
Installing thor (0.19.1)
Installing oauth (0.4.7)
Installing multi_xml (0.5.5)
Using bundler (1.5.2)
Installing multi_json (1.10.0)
Installing hike (1.2.3)
Installing high_voltage (2.1.0)
Installing tilt (1.4.1)
Installing tzinfo (1.1.0)
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/ruby-2.1.1/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal',
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
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=/tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/ruby-2.1.1/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
--enable-local
--disable-local
extconf failed, exit code 1
Gem files will remain installed in /tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/bundle/ruby/2.1.0/gems/sqlite3-1.3.9 for inspection.
Results logged to /tmp/build_a6d6f6f3-1b58-4344-8c47-ff3f4229b149/vendor/bundle/ruby/2.1.0/extensions/x86_64-linux/2.1.0-static/sqlite3-1.3.9/gem_make.out
Installing rack-test (0.6.2)
Installing rdoc (4.1.1)
Installing treetop (1.4.15)
An error occurred while installing sqlite3 (1.3.9), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.9'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Detected sqlite3 gem which is not supported on Heroku.
! https://devcenter.heroku.com/articles/sqlite3
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:rails-bootstrap-test.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:rails-bootstrap-test.git'
According to the book, your Gemfile should look like this:
source 'https://rubygems.org'
ruby '2.1.1'
gem 'rails', '4.1.1'
gem 'sass-rails', '~> 4.0.1'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'spring', group: :development
gem 'activerecord-tableless'
gem 'bootstrap-sass'
gem 'google_drive'
gem 'high_voltage'
gem 'simple_form'
group :development do
gem 'sqlite3'
gem 'better_errors'
gem 'binding_of_caller', :platforms=>[:mri_21]
gem 'quiet_assets'
gem 'rails_layout'
end
group :production do
gem 'pg'
gem 'thin'
gem 'rails_12factor'
end
Make sure gem 'sqlite3' is in the development group. SQLite is not supported on Heroku so you don't want Heroku trying to install it.
This has been a problem for others as well...including myself. I solved it by making sure sqlite3 was only in the development group and pushing to github again to update any changes.
Here are some links where it seems others have commented on this problem:
An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue
Errors of pushing rails app to Heroku error occurred while installing sqlite3, and Bundler cannot continue
Ok, so weird... I ended up destroying the Heroku app and recreating it. That solved the problem it seems.

Error installing pg gem

In order to deploy my rails app to heroku, I made change to my Gemfile by adding
gem 'pg'
Once I did
bundle install
I am getting following error -
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.1)
Using i18n (0.6.9)
Using minitest (4.7.5)
Using multi_json (1.8.2)
Using atomic (1.1.14)
Using thread_safe (0.1.3)
Using tzinfo (0.3.38)
Using activesupport (4.0.0)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.0.0)
Using mime-types (1.25.1)
Using polyglot (0.3.3)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.0.0)
Using activemodel (4.0.0)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.1)
Using activerecord (4.0.0)
Using bundler (1.3.5)
Using coffee-script-source (1.6.3)
Using execjs (2.0.2)
Using coffee-script (2.2.0)
Using thor (0.18.1)
Using railties (4.0.0)
Using coffee-rails (4.0.1)
Using hike (1.2.3)
Using jbuilder (1.5.3)
Using jquery-rails (3.0.4)
Using json (1.8.1)
Installing pg (0.17.1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/aniruddhabarapatre1/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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/aniruddhabarapatre1/.rvm/rubies/ruby-2.0.0-p247/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}/
Gem files will remain installed in /Users/aniruddhabarapatre1/.rvm/gems/ruby-2.0.0-p247/gems/pg-0.17.1 for inspection.
Results logged to /Users/aniruddhabarapatre1/.rvm/gems/ruby-2.0.0-p247/gems/pg-0.17.1/ext/gem_make.out
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.
I assumed I didn't had PostgreSQL installed on my computer and hence downloaded it to no use.
I tried couple of other options and ran following command with similar errors again.
gem install pg
Got this thing figured out.
Since I had PostgreSQL.app already installed. Gave following command -
gem install pg -- --with-pg-config=/Applications/Postgres93.app/Contents/MacOS/bin/pg_config
This works => env ARCHFLAGS="-arch x86_64" gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.4/bin/pg_config
Do you have postgres development libraries?
I uninstalled then reinstalled postgresql. Then I installed pg -v '0.17.1'. After that I ran bundle. It worked.

An error occurred while installing pg (0.15.1) ; PostgreSQL on Mac Installation Error: no pg_config, gem native extension build failure

I have OSX 10.6.8 and am trying to install PostgreSQL 9.2 on my device. I used the graphical installer available on their website, and set up the software, without using stack builder at the end to additionally configure other functions.
When I load my Rails file and bundle install I encounter the following error:
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Using rake (10.1.0)
Using i18n (0.6.4)
Using minitest (4.7.5)
Using multi_json (1.7.7)
Using atomic (1.1.10)
Using thread_safe (0.1.0)
Using tzinfo (0.3.37)
Using activesupport (4.0.0)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.0.0)
Using formatador (0.2.4)
Using rb-fsevent (0.9.3)
Using rb-inotify (0.9.0)
Using rb-kqueue (0.2.0)
Using listen (1.2.2)
Using lumberjack (1.0.4)
Using method_source (0.8.1)
Using slop (3.4.5)
Using pry (0.9.12.2)
Using guard (1.8.1)
Using rspec-core (2.13.1)
Using rspec-expectations (2.13.0)
Using turbolinks (1.2.0)
Using jquery-turbolinks (1.0.0)
Using jquery-ui-rails (4.0.3)
Using json (1.8.0)
Using kaminari (0.14.1)
Using nested_form (0.3.2)
Installing pg (0.15.1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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/local/rvm/rubies/ruby-1.9.3-p448/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
Gem files will remain installed in /usr/local/rvm/gems/ruby-1.9.3-p448/gems/pg-0.15.1 for inspection.
Results logged to /usr/local/rvm/gems/ruby-1.9.3-p448/gems/pg-0.15.1/ext/gem_make.out
An error occurred while installing pg (0.15.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.15.1'` succeeds before bundling.
I have tried gem install pg -- --with-pg-config=/Library/PostgreSQL/9.1/bin/pg_config , all of the error message suggestions I've gotten and the solutions here. I have also tried re-installing Postgres, locating the appropriate config path, and locating the mfmk.log file the error message mentions (but the file doesn't exist on my computer). Furthermore, under my apps/PostgreSQL, there is a "Reload Configuration" application that, when I run, says Server signaled.
Anyone know what I should do? I was going to try Homebrew, but I found it quite strange that the installer itself wouldn't be able to produce functioning software.
If you are on a Mac try:
ARCHFLAGS="-arch x86_64" gem install pg
This worked for me (The brew installer told me this... gotta love brew)

Resources