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.
Related
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
Having issues trying to instal bundle install---I keep getting this error message what am I doing wrong? Please help.
Using rake (10.1.0)
Using i18n (0.6.1)
Using multi_json (1.8.2)
Using activesupport (3.2.13)
Using builder (3.0.4)
Using activemodel (3.2.13)
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.2)
Using actionpack (3.2.13)
Using mime-types (1.23)
Using polyglot (0.3.3)
Using treetop (1.4.14)
Using mail (2.5.4)
Using actionmailer (3.2.13)
Using arel (3.0.2)
Using tzinfo (0.3.37)
Using activerecord (3.2.13)
Using activerecord-oracle_enhanced-adapter (1.4.2)
Using activeresource (3.2.13)
Using net-ldap (0.3.1)
Using adauth (1.2.1)
Using addressable (2.3.5)
Using json (1.8.1)
Using airbrake (3.1.12)
Using rack-ssl (1.3.3)
Using rdoc (3.12.2)
Using thor (0.18.1)
Using railties (3.2.13)
Using jquery-rails (1.0.19)
Using bundler (1.3.5)
Using rails (3.2.13)
Using best_in_place (2.1.0)
Using bootstrap-sass (2.0.4.2)
Using cancan (1.6.10)
Using highline (1.6.19)
Using net-ssh (2.6.7)
Using net-scp (1.1.1)
Using net-sftp (2.1.2)
Using net-ssh-gateway (1.2.0)
Using capistrano (2.12.0)
Using mini_portile (0.5.1)
Using nokogiri (1.6.0)
Using xpath (2.0.0)
Using capybara (2.1.0)
Using ffi (1.9.0)
Using childprocess (0.3.9)
Using chronic (0.9.1)
Using coderay (1.0.9)
Using coffee-script-source (1.6.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using coffee-rails (3.2.2)
Using composite_primary_keys (5.0.13)
Using database_cleaner (0.7.2)
Using diff-lcs (1.2.4)
Using factory_girl (4.2.0)
Using factory_girl_rails (4.2.1)
Using sass (3.2.12)
Using sass-rails (3.2.6)
Using font-awesome-sass-rails (3.0.2.2)
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.2)
Using slop (3.4.6)
Using pry (0.9.12.2)
Using guard (1.8.2)
Using rspec-core (2.14.4)
Using rspec-expectations (2.14.0)
Using rspec-mocks (2.14.2)
Using rspec (2.14.1)
Using guard-rspec (3.0.2)
Using haml (4.0.3)
Using haml-rails (0.4)
Using iconv (1.0.3)
Using jquery-scrollto-rails (1.4.2)
Using jquery-ui-rails (4.0.3)
Using jquery-ui-sass-rails (4.0.3.0)
Using kaminari (0.14.1)
Using launchy (2.3.0)
Using libv8 (3.11.8.17)
Using quiet_assets (1.0.2)
Using ref (1.0.5)
Using rspec-rails (2.14.0)
Installing ruby-oci8 (2.1.5)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
checking for load library path...
LD_LIBRARY_PATH is not set.
checking ld.so.conf... no
checking for cc... ok
checking for gcc... yes
checking for LP64... no
checking for sys/types.h... yes
checking for ruby header... ok
*** 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/ruby1.9.1
--with-instant-client
--without-instant-client
/home/jsow/.bundler/tmp/23014/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:889:in `get_home': RuntimeError (RuntimeError)
from /home/jsow/.bundler/tmp/23014/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:705:in `initialize'
from /home/jsow/.bundler/tmp/23014/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `new'
from /home/jsow/.bundler/tmp/23014/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `get'
from extconf.rb:18:in `<main>'
---------------------------------------------------
Error Message:
Set the environment variable ORACLE_HOME if Oracle Full Client.
Append the path of Oracle client libraries to LD_LIBRARY_PATH if Oracle Instant Client.
The ruby-oci8 gem needs the Oracle client libraries to compile. According to the error message:
Error Message:
Set the environment variable ORACLE_HOME if Oracle Full Client.
Append the path of Oracle client libraries to LD_LIBRARY_PATH if Oracle Instant Client.
your ORACLE_HOME environment variable is not set, nor can it find the needed libraries in LD_LIBRARY_PATH.
Make sure that your have either Oracle Full Client or Oracle Instant Client installed and properly set, and try again.
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.
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)
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.