I am new - what ought I do in this situation...

172 views
Skip to first unread message

Jason Baguio

unread,
Aug 25, 2012, 9:07:59 PM8/25/12
to boston-r...@googlegroups.com
I am trying - $ git push heroku master

and am getting the message below...
  
Gem files will remain installed in /tmp/build_1ti4amz1qwdo3/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6 for inspection.
       Results logged to /tmp/build_1ti4amz1qwdo3/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out
       An error occurred while installing sqlite3 (1.3.6), and Bundler cannot continue.
       Make sure that `gem install sqlite3 -v '1.3.6'` succeeds before bundling.
 !
 !     Failed to install gems via Bundler.
 !     
 !     Detected sqlite3 gem which is not supported on Heroku.
 !
 !     Heroku push rejected, failed to compile Ruby/rails app

Brice Stacey

unread,
Aug 25, 2012, 9:17:07 PM8/25/12
to boston-r...@googlegroups.com
I believe Heroku only supposts postgres. Switch to it and it should work.

If you don't want to use postgres locally, you should be able to move sqlite3 into a dev/test group and add pg to the prod group.

-Brice


--
 
 

Brian Cardarella

unread,
Aug 26, 2012, 5:21:57 AM8/26/12
to boston-r...@googlegroups.com
Brice is correct. Here is exactly what you want:

Edit your Gemfile

remove: gem 'sqlite3'

add:

group :development, :test do
gem 'sqlite3'
end

group :production do
gem 'pg'
end

Run bundle install, commit locally and push to heroku again. This is
the easiest way to get around this issue. Ideally you want to be using
the same database in production as you are developing on but if you
are just getting started this is good enough.

----------------------
Brian Cardarella
Principal at DockYard
Visit us: http://dockyard.com
Call us: (855) DOCK-YRD
Follow me on Twitter: http://twitter.com/bcardarella
Follow us on Twitter: http://twitter.com/DockYard
> --
>
>

Jason Baguio

unread,
Aug 26, 2012, 9:07:33 AM8/26/12
to boston-r...@googlegroups.com
Okay... I opened Gemfile and changed it from...Alson I am running Rails 3.28 and Ruby 1.9.3p194

gem 'rails', '3.2.8'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

...

..........CHANGED TO..........

...

gem 'rails', '3.2.8'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

group :development, :test do 
  gem 'sqlite3' 
end 

group :production do 
  gem 'pg' 
end 


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

...

------------------AFTER I ran bundle install I received...

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/mgoff1/.rvm/rubies/ruby-1.9.3-p194/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/mgoff1/.rvm/rubies/ruby-1.9.3-p194/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 /Users/mgoff1/.rvm/gems/ruby-1.9.3-p194@global/gems/pg-0.14.0 for inspection.
Results logged to /Users/mgoff1/.rvm/gems/ruby-1.9.3-p194@global/gems/pg-0.14.0/ext/gem_make.out
An error occured while installing pg (0.14.0), and Bundler cannot continue.
Make sure that `gem install pg -v '0.14.0'` succeeds before bundling.

--------- A after I changed it back, ran bundle install and it worked. Then I just changed gem'sqlite3' to gem'pg' and receivd another error message.

I am running Rails 3.28 and Ruby 1.9.3p194

Patrick Robertson

unread,
Aug 26, 2012, 9:12:49 AM8/26/12
to boston-r...@googlegroups.com
Locally you need to run 'bundle install --without production' with the prescribed Gemfile changes.

This is because you do not have postgres installed locally and it cannot build the C extensions for that gem.  Alternatively, you could install postgres.

- Patrick
--
 
 

Patrick Hereford

unread,
Aug 26, 2012, 9:19:07 AM8/26/12
to boston-r...@googlegroups.com
Easiest Postgres installation: postgresapp.com if you have a Mac ;-)

Sent from my iPhone
--
 
 

Jason Leo Baguio

unread,
Aug 26, 2012, 11:08:01 AM8/26/12
to boston-r...@googlegroups.com
Okay I installed postgresql and changed Gemfile to... 

...
# gem 'rails', :git => 'git://github.com/rails/rails.git'

group :development, :test do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
end

# Gems used only for assets and not required
...

------and the bundle install worked... But when I push to heroku - git push heroku master - I get the error message below.

Counting objects: 66, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (52/52), done.
Writing objects: 100% (66/66), 26.27 KiB, done.
Total 66 (delta 4), reused 0 (delta 0)

-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.2.0.rc.2
       Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
       Fetching gem metadata from https://rubygems.org/.......
       Installing rake (0.9.2.2)
       Installing i18n (0.6.0)
       Installing multi_json (1.3.6)
       Installing activesupport (3.2.8)
       Installing builder (3.0.0)
       Installing activemodel (3.2.8)
       Installing erubis (2.7.0)
       Installing journey (1.0.4)
       Installing rack (1.4.1)
       Installing rack-cache (1.2)
       Installing rack-test (0.6.1)
       Installing hike (1.2.1)
       Installing tilt (1.3.3)
       Installing sprockets (2.1.3)
       Installing actionpack (3.2.8)
       Installing mime-types (1.19)
       Installing polyglot (0.3.3)
       Installing treetop (1.4.10)
       Installing mail (2.4.4)
       Installing actionmailer (3.2.8)
       Installing arel (3.0.2)
       Installing tzinfo (0.3.33)
       Installing activerecord (3.2.8)
       Installing activeresource (3.2.8)
       Installing coffee-script-source (1.3.3)
       Installing execjs (1.4.0)
       Installing coffee-script (2.2.0)
       Installing rack-ssl (1.3.2)
       Installing json (1.7.5) with native extensions
       Installing rdoc (3.12)
       Installing thor (0.16.0)
       Installing railties (3.2.8)
       Installing coffee-rails (3.2.2)
       Installing jquery-rails (2.1.1)
       Using bundler (1.2.0.rc.2)
       Installing rails (3.2.8)
       Installing sass (3.2.1)
       Installing sass-rails (3.2.5)
       Installing sqlite3 (1.3.6) with native extensions
       Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
       /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_26bfsq0bz5xj5/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6 for inspection.
       Results logged to /tmp/build_26bfsq0bz5xj5/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out
       An error occurred while installing sqlite3 (1.3.6), and Bundler cannot continue.
       Make sure that `gem install sqlite3 -v '1.3.6'` succeeds before bundling.
 !
 !     Failed to install gems via Bundler.
 !     
 !     Detected sqlite3 gem which is not supported on Heroku.
 !
 !     Heroku push rejected, failed to compile Ruby/rails app

To g...@heroku.com:loap-rb-jason.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'g...@heroku.com:loap-rb-jason.git'




--





--
Warmest regards,

Jason L. Baguio

310.880.9059

Alex Jarvis

unread,
Aug 26, 2012, 11:27:20 AM8/26/12
to boston-r...@googlegroups.com
Did you commit your changes to the Gemfile? 


---------------------------
Alex M. Jarvis
www.AlxJrvs.com
'AlxJrvs' on Twitter



--
 
 

Jason Leo Baguio

unread,
Aug 26, 2012, 12:25:30 PM8/26/12
to boston-r...@googlegroups.com
Ahhh...what is the best way to do that - I am completely new...sorry if these questions are elementary?

Alex Jarvis

unread,
Aug 26, 2012, 12:29:11 PM8/26/12
to boston-r...@googlegroups.com
So, someone on this thread can offer you a post or link that will help you discover the ins and outs of git. 

What happens when you run git status? What does it say? 



---------------------------
Alex M. Jarvis
www.AlxJrvs.com
'AlxJrvs' on Twitter



--
 
 

Jason Leo Baguio

unread,
Aug 26, 2012, 12:34:32 PM8/26/12
to boston-r...@googlegroups.com
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
nothing to commit (working directory clean)

Alex Jarvis

unread,
Aug 26, 2012, 12:36:10 PM8/26/12
to boston-r...@googlegroups.com
Hmm. Interesting. Anyone else want to weigh in? I am not entirely sure where to go next, though I have faced down this *exact* problem before, I can't quite remember how to fix it. 



---------------------------
Alex M. Jarvis
www.AlxJrvs.com
'AlxJrvs' on Twitter



--
 
 

Jason Leo Baguio

unread,
Aug 26, 2012, 12:42:08 PM8/26/12
to boston-r...@googlegroups.com
Thank you for your effort...I'll keep looking online. 

Brian Cardarella

unread,
Aug 26, 2012, 12:55:19 PM8/26/12
to boston-r...@googlegroups.com
Develop by committee! :)

If you come into the Freenode #boston.rb channel it might be easier.
Or if you still have problems you can come to the next Project Night
in Sept and myself or another can help

----------------------
Brian Cardarella
Principal at DockYard
Visit us: http://dockyard.com
Call us: (855) DOCK-YRD
Follow me on Twitter: http://twitter.com/bcardarella
Follow us on Twitter: http://twitter.com/DockYard


On Sun, Aug 26, 2012 at 4:42 PM, Jason Leo Baguio
> --
>
>

Bill Burton

unread,
Aug 26, 2012, 12:48:16 PM8/26/12
to boston-r...@googlegroups.com
Hello,

You have a couple of commits that are not pushed.

Does your app run locally with Postgres?  If not, check your database.yml.

Change your Gemfile to use: gem 'pg' and remove the development, test and production blocks with references to sqlite then run bundle install to update Gemfile.lock and commit.

Hope this helps,
-Bill

--
 
 


Jason Leo Baguio

unread,
Aug 26, 2012, 1:52:22 PM8/26/12
to boston-r...@googlegroups.com
I will be there...
is there a date set?

Patrick Robertson

unread,
Aug 26, 2012, 2:02:28 PM8/26/12
to boston-r...@googlegroups.com, boston-r...@googlegroups.com
September 4th!   I'll be happy to help there. 

- Patrick

Sent from my iPhone
--
 
 

Jason Leo Baguio

unread,
Aug 26, 2012, 2:24:11 PM8/26/12
to boston-r...@googlegroups.com
Thank you...Time? Place?

Patrick Robertson

unread,
Aug 26, 2012, 2:31:58 PM8/26/12
to boston-r...@googlegroups.com
While the website hasn't been updated for September yet, it contains all the relevant deets.  Just replace August 7 with September 4th. 

--
 
 
Reply all
Reply to author
Forward
0 new messages