I've try the method from others post, but still cannot solve it.
I push my file to heroku but it have some error to the sqlite3.
After I install it, it still didn't work.
Below is my code
Counting objects: 82, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (70/70), done.
Writing objects: 100% (82/82), 3.00 MiB | 238 KiB/s, done.
Total 82 (delta 4), reused 0 (delta 0)
-----> Removing .DS_Store files
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.3.2
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Installing rake (10.0.4)
Installing i18n (0.6.4)
Installing multi_json (1.7.3)
Installing activesupport (3.2.11)
Installing builder (3.0.4)
Installing activemodel (3.2.11)
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.2)
Installing tilt (1.4.1)
Installing sprockets (2.2.2)
Installing actionpack (3.2.11)
Installing mime-types (1.23)
Installing polyglot (0.3.3)
Installing treetop (1.4.12)
Installing mail (2.4.4)
Installing actionmailer (3.2.11)
Installing arel (3.0.2)
Installing tzinfo (0.3.37)
Installing activerecord (3.2.11)
Installing activeresource (3.2.11)
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.11)
Installing coffee-rails (3.2.2)
Installing jquery-rails (2.2.1)
Using bundler (1.3.2)
Installing rails (3.2.11)
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 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_2ghtqnawaxqqm/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.7 for inspection.
Results logged to /tmp/build_2ghtqnawaxqqm/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 continue.
Make sure that `gem install sqlite3 -v '1.3.7'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
To git#heroku.com:peaceful-reef-2102.git
! [remote rejected] master -> master (pre-receive hook declined)
And this is my gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.11'
# 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'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
I don't know what happen, please help me!
Heroku doesn't support sqlite, you need to add pg gem (postgres) and remove sqlite gem
Related
I need help with the following error. I'm trying to deploy Rails 4 app on Heroku..
It seems like gems can't be installed. Whan can I do about it?
I've tried to solve this using some "googling" solutions but nothing seems to work. And yes I have put sqlite and postgresql in the right group in gemfile (production/developement).
Any thoughts?
Here is the bash procedure when deploying:
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/..
Installing i18n (0.6.9)
Installing multi_json (1.9.2)
Installing minitest (4.7.5)
Installing rake (10.3.1)
Installing builder (3.1.4)
Installing thread_safe (0.3.3)
Installing erubis (2.7.0)
Installing tzinfo (0.3.39)
Installing mime-types (1.25.1)
Installing rack (1.5.2)
Installing polyglot (0.3.4)
Installing activerecord-deprecated_finders (1.0.3)
Installing arel (4.0.2)
Installing coffee-script-source (1.7.0)
Installing execjs (2.0.2)
Installing chunky_png (1.3.1)
Installing thor (0.19.1)
Installing commonjs (0.2.7)
Installing orm_adapter (0.5.0)
Installing hike (1.2.3)
Installing bcrypt (3.1.7)
Installing json (1.8.1)
Using bundler (1.5.2)
Installing libv8 (3.16.14.3)
Installing tilt (1.4.1)
Installing rails_serve_static_assets (0.0.2)
Installing rails_stdout_logging (0.0.3)
Installing ref (1.0.5)
Installing sass (3.2.19)
Installing activesupport (4.0.2)
Installing rack-test (0.6.2)
Installing warden (1.2.3)
Installing treetop (1.4.15)
Installing coffee-script (2.2.0)
Installing rdoc (4.1.1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/tmp/build_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/ruby-2.0.0/bin/ruby extconf.rb
checking for sndfile.h in /opt/local/include,/usr/local/include,C:/Program Files (x86)/Mega-Nerd/libsndfile/include,C:/Program Files/Mega-Nerd/libsndfile/include... no
checking for sf_open() in -lsndfile-1... no
checking for sf_open() in -lsndfile... 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
--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_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/ruby-2.0.0/bin/ruby
--with-sndfile-dir
--without-sndfile-dir
--with-sndfile-include
--without-sndfile-include=${sndfile-dir}/include
--with-sndfile-lib
--without-sndfile-lib=${sndfile-dir}/
--with-sndfile-1lib
--without-sndfile-1lib
--with-sndfilelib
--without-sndfilelib
extconf.rb:21:in `<main>': Can't find libsndfile (http://www.mega-nerd.com/libsndfile/) (RuntimeError)
Try passing --with-sndfile-dir or --with-sndfile-lib and --with-sndfile-include
options to extconf. If there are spaces in the path on windows, it may not work.
Gem files will remain installed in /tmp/build_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/bundle/ruby/2.0.0/gems/ruby-audio-1.6.1 for inspection.
Results logged to /tmp/build_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/bundle/ruby/2.0.0/gems/ruby-audio-1.6.1/ext/rubyaudio_ext/gem_make.out
Installing uglifier (2.5.0)
Installing less (2.5.0)
Installing pg (0.17.1)
An error occurred while installing ruby-audio (1.6.1), and Bundler cannot
continue.
Make sure that `gem install ruby-audio -v '1.6.1'` succeeds before bundling.
Bundler Output: Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Installing i18n (0.6.9)
Installing multi_json (1.9.2)
Installing minitest (4.7.5)
Installing rake (10.3.1)
Installing builder (3.1.4)
Installing thread_safe (0.3.3)
Installing erubis (2.7.0)
Installing tzinfo (0.3.39)
Installing mime-types (1.25.1)
Installing rack (1.5.2)
Installing polyglot (0.3.4)
Installing activerecord-deprecated_finders (1.0.3)
Installing arel (4.0.2)
Installing coffee-script-source (1.7.0)
Installing execjs (2.0.2)
Installing chunky_png (1.3.1)
Installing thor (0.19.1)
Installing commonjs (0.2.7)
Installing orm_adapter (0.5.0)
Installing hike (1.2.3)
Installing bcrypt (3.1.7)
Installing json (1.8.1)
Using bundler (1.5.2)
Installing libv8 (3.16.14.3)
Installing tilt (1.4.1)
Installing rails_serve_static_assets (0.0.2)
Installing rails_stdout_logging (0.0.3)
Installing ref (1.0.5)
Installing sass (3.2.19)
Installing activesupport (4.0.2)
Installing rack-test (0.6.2)
Installing warden (1.2.3)
Installing treetop (1.4.15)
Installing coffee-script (2.2.0)
Installing rdoc (4.1.1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/tmp/build_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/ruby-2.0.0/bin/ruby extconf.rb
checking for sndfile.h in /opt/local/include,/usr/local/include,C:/Program Files (x86)/Mega-Nerd/libsndfile/include,C:/Program Files/Mega-Nerd/libsndfile/include... no
checking for sf_open() in -lsndfile-1... no
checking for sf_open() in -lsndfile... 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
--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_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/ruby-2.0.0/bin/ruby
--with-sndfile-dir
--without-sndfile-dir
--with-sndfile-include
--without-sndfile-include=${sndfile-dir}/include
--with-sndfile-lib
--without-sndfile-lib=${sndfile-dir}/
--with-sndfile-1lib
--without-sndfile-1lib
--with-sndfilelib
--without-sndfilelib
extconf.rb:21:in `<main>': Can't find libsndfile (http://www.mega-nerd.com/libsndfile/) (RuntimeError)
Try passing --with-sndfile-dir or --with-sndfile-lib and --with-sndfile-include
options to extconf. If there are spaces in the path on windows, it may not work.
Gem files will remain installed in /tmp/build_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/bundle/ruby/2.0.0/gems/ruby-audio-1.6.1 for inspection.
Results logged to /tmp/build_55f006e8-de4b-4dcc-9c81-39f56d6f8f04/vendor/bundle/ruby/2.0.0/gems/ruby-audio-1.6.1/ext/rubyaudio_ext/gem_make.out
Installing uglifier (2.5.0)
Installing less (2.5.0)
Installing pg (0.17.1)
An error occurred while installing ruby-audio (1.6.1), and Bundler cannot
continue.
Make sure that `gem install ruby-audio -v '1.6.1'` succeeds before bundling.
Failed to install gems via Bundler.
Push rejected, failed to compile Ruby app
To git#heroku.com:quiet-waters-5319.git
[remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:quiet-waters-5319.git'
seems heroku isn't able to build the native parts of required ruby-audio. After a quick search on "ruby-audio heroku" I found this: https://github.com/khurramzaman/ruby-audio-heroku
I am on windows and using RubyMine to develop an app. My 2-year old was found banging on the keyboard when I had stepped away for a sec. She did something to the environment that I can't figure out. I'm getting the following error when I try to run bundle install or bundle update:
C:\RailsInstaller\Ruby1.9.3\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:\RailsInstaller\Ruby1.9.3\bin/bundle update
C:/RailsInstaller/Ruby1.9.3/bin/bundle:23:in `load': cannot load such file -- C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.4.0.rc.1/bin/bundle (LoadError)
from C:/RailsInstaller/Ruby1.9.3/bin/bundle:23:in `<top (required)>'
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
My gemfile looks like this:
source 'https://rubygems.org'
gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'jquery-rails'
gem 'bcrypt-ruby', '~> 3.0.0'
gem 'paperclip'
gem 'wicked' #For handling *.pdf documents, use wicked_pdf
gem 'public_activity'
gem 'thin'
gem 'strong_parameters'
# 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'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
group :development, :test do
gem 'rspec-rails'
gem 'sqlite3'
gem 'autotest'
gem 'autotest-rails-pure'
end
group :development do
gem 'annotate'
end
group :production do
gem 'pg'
end
bcrypt-ruby is set to gem 'bcrypt-ruby', '~> 3.0.0' to handle another error (duplicate version load error).
My gem environment is this:
RUBYGEMS VERSION: 1.8.24
RUBY VERSION: 1.9.3 (2013-02-22 patchlevel 392) [i386-mingw32]
INSTALLATION DIRECTORY: C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
RUBY EXECUTABLE: C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe
EXECUTABLE DIRECTORY: C:/RailsInstaller/Ruby1.9.3/bin
RUBYGEMS PLATFORMS:
ruby
x86-mingw32
GEM PATHS:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1
C:/Documents and Settings/Me/.gem/ruby/1.9.1
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:benchmark => false
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
http://rubygems.org/
----------------------
IDE: JetBrains RubyMine 5.4.3.2.1, build #RM-129.861
OS: Windows XP 5.1[x86]
Java: 1.7.0_10-b18
RubyMine SDK Environment:
Sdk: ruby-1.9.3-p392
Sdk Version: ver.1.9.3p392 p392
Ruby Interpreter: C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe
RVM Sdk: no
Sdk Language Level: 1.9
Sdk Load Path:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1
C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/i386-msvcrt
C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby
C:/RailsInstaller/Ruby1.9.3/lib/ruby/vendor_ruby/1.9.1
C:/RailsInstaller/Ruby1.9.3/lib/ruby/vendor_ruby/1.9.1/i386-msvcrt
C:/RailsInstaller/Ruby1.9.3/lib/ruby/vendor_ruby
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1
C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/i386-mingw32
C:/Program Files/RubyMine 5.4.3.2.1/rubystubs193
Sdk Gem paths:
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems
C:/Documents and Settings/Kraig/.gem/ruby/1.9.1/gems
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/bundler/gems
Gems used for 'ballast':
diff-lcs (1.2.4)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/diff-lcs-1.2.4
rack-test (0.6.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-test-0.6.2
coffee-rails (3.2.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/coffee-rails-3.2.2
erubis (2.7.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/erubis-2.7.0
uglifier (2.2.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/uglifier-2.2.1
actionmailer (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionmailer-3.2.11
pg (0.17.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/pg-0.17.0-x86-mingw32
arel (3.0.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/arel-3.0.2
builder (3.0.4)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/builder-3.0.4
autotest-rails-pure (4.1.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/autotest-rails-pure-4.1.2
public_activity (1.4.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/public_activity-1.4.0
thin (1.5.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thin-1.5.1
rails (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rails-3.2.11
eventmachine (1.0.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.3-x86-mingw32
paperclip (3.5.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/paperclip-3.5.1
mail (2.4.4)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mail-2.4.4
json (1.8.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.8.0
daemons (1.1.9)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/daemons-1.1.9
climate_control (0.0.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/climate_control-0.0.3
activesupport (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.11
journey (1.0.4)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/journey-1.0.4
rake (10.1.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rake-10.1.0
coffee-script (2.2.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/coffee-script-2.2.0
jquery-rails (3.0.4)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/jquery-rails-3.0.4
rdoc (3.12.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rdoc-3.12.2
railties (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/railties-3.2.11
rspec-core (2.14.5)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.5
multi_json (1.8.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/multi_json-1.8.1
ZenTest (4.8.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/ZenTest-4.8.3
rspec-mocks (2.14.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-mocks-2.14.3
execjs (2.0.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/execjs-2.0.2
thor (0.18.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.18.1
sprockets (2.2.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sprockets-2.2.2
wicked (1.0.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/wicked-1.0.0
strong_parameters (0.2.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/strong_parameters-0.2.1
polyglot (0.3.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/polyglot-0.3.3
tilt (1.4.1)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/tilt-1.4.1
annotate (2.5.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/annotate-2.5.0
activeresource (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activeresource-3.2.11
autotest (4.4.6)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/autotest-4.4.6
bcrypt-ruby (3.1.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bcrypt-ruby-3.1.2-x86-mingw32
mime-types (1.25)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mime-types-1.25
i18n (0.6.5)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/i18n-0.6.5
activerecord (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activerecord-3.2.11
rack-ssl (1.3.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-ssl-1.3.3
rspec-rails (2.14.0)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-rails-2.14.0
activemodel (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activemodel-3.2.11
sass-rails (3.2.6)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sass-rails-3.2.6
rack (1.4.5)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-1.4.5
treetop (1.4.15)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/treetop-1.4.15
sass (3.2.12)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sass-3.2.12
rack-cache (1.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rack-cache-1.2
sqlite3 (1.3.8)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.8-x86-mingw32
hike (1.2.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/hike-1.2.3
tzinfo (0.3.37)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/tzinfo-0.3.37
actionpack (3.2.11)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/actionpack-3.2.11
rspec-expectations (2.14.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.14.3
coffee-script-source (1.6.3)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/coffee-script-source-1.6.3
cocaine (0.5.2)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/cocaine-0.5.2
bundler (1.3.4)
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.4
I have tried to manually update the gem in question, revert back to an older version, etc. I can't figure out why the error is occuring. rails s won't work until i get this debugged.
Any ideas?
Does the file C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.4.0.rc.1/bin/bundle exist?
Try uninstalling and then reinstalling the bundler gem.
I am trying to add devise to my application and gem install works, but everytime I run bundle install, it does not find devise in my gemlist. I have tried including the git link and using a specific version, but it still does not find it in my gemfile.
Terminal
$bundle install
$Using rake (0.9.2.2)
Using i18n (0.6.0)
Using multi_json (1.3.6)
Using activesupport (3.2.5)
Using builder (3.0.0)
Using activemodel (3.2.5)
Using erubis (2.7.0)
Using journey (1.0.3)
Using rack (1.4.1)
Using rack-cache (1.2)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.1.3)
Using actionpack (3.2.5)
Using mime-types (1.18)
Using polyglot (0.3.3)
Using treetop (1.4.10)
Using mail (2.4.4)
Using actionmailer (3.2.5)
Using arel (3.0.2)
Using tzinfo (0.3.33)
Using activerecord (3.2.5)
Using activeresource (3.2.5)
Using coffee-script-source (1.3.3)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.2)
Using json (1.7.3)
Using rdoc (3.12)
Using thor (0.15.2)
Using railties (3.2.5)
Using coffee-rails (3.2.2)
Using jquery-rails (2.0.2)
Using bundler (1.1.4)
Using rails (3.2.5)
Using sass (3.1.19)
Using sass-rails (3.2.5)
Using sqlite3 (1.3.6)
Using uglifier (1.2.4)
Your bundle is complete! Usebundle show [gemname]to see where a bundled gem is installed.
Gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.5'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'devise'
# 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'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
I've made sure that all the files are in the root of the repository as recommended in this discussion. However, as I follow the instructions in this section of the book, I can't get through the section without the problems. What do you think is happening with my system that's causing the error? I have no clue at the moment of what the problem means despite reading the following in the log. Thanks in advance for your help!
stanley#ubuntu:~/rails_sample/first_app$ git push heroku master
Warning: Permanently added the RSA host key for IP address '50.19.85.156' to the list of known hosts.
Counting objects: 96, done.
Compressing objects: 100% (79/79), done.
Writing objects: 100% (96/96), 28.81 KiB, done.
Total 96 (delta 22), reused 0 (delta 0)
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.2.0.pre
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.5)
Installing activesupport (3.2.3)
Installing builder (3.0.0)
Installing activemodel (3.2.3)
Installing erubis (2.7.0)
Installing journey (1.0.3)
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.3)
Installing mime-types (1.18)
Installing polyglot (0.3.3)
Installing treetop (1.4.10)
Installing mail (2.4.4)
Installing actionmailer (3.2.3)
Installing arel (3.0.2)
Installing tzinfo (0.3.33)
Installing activerecord (3.2.3)
Installing activeresource (3.2.3)
Installing coffee-script-source (1.3.3)
Installing execjs (1.3.2)
Installing coffee-script (2.2.0)
Installing rack-ssl (1.3.2)
Installing json (1.7.3) with native extensions
Installing rdoc (3.12)
Installing thor (0.14.6)
Installing railties (3.2.3)
Installing coffee-rails (3.2.2)
Installing jquery-rails (2.0.2)
Using bundler (1.2.0.pre)
Installing rails (3.2.3)
Installing sass (3.1.18)
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_3tplrxvj7qa81/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.6 for inspection.
Results logged to /tmp/build_3tplrxvj7qa81/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.
!
! Heroku push rejected, failed to compile Ruby/rails app
To git#heroku.com:growing-mountain-2788.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:growing-mountain-2788.git'
------Gemfile------------------------
As requested, here's the auto-generated gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'json'
# 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'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platform => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug'
Heroku tries to use postgres automatically. (good thing, as sqlite is NOT suitable for prosuction)
The sqlite scripts are compatible with postgres, so no change is required.
Do this in your Gemfile :
gem "sqlite3", :groups => [:development, :test]
gem "pg", groups => [:production]
Be aware that there might be behavior differences between sqlite and postgres. It is strongly recommended to use postgres on your development environment
see https://devcenter.heroku.com/articles/how-do-i-use-sqlite3-for-development
The problem is missing headers files to sqlite3 on the server and gem cannot build the extension. Do you need sqlite? Try remove it from Gemfile or if this is possible install sqlite3-dev package on the server.
I had this same problem, the problem went away when I completed my push to GitHub.
I needed to complete this step:
$ git remote add origin ...
$ git push -u origin master
After that it pushed to heroku without any problems.
Replace the SQLite gem with postgres's pg gem. Heroku uses Postgres and you don't need SQLite in production mode anyway.
Replace sqlite in your Gemfile with 'gem pg'
Heroku use PostgreSQL, not SQLite.
Follow this instructions to solve your problem https://devcenter.heroku.com/articles/rails3
I get an error after issuing the git push heroku command. This initially looked like something to be solved by using the heroku config command to bundle without the development:test gems. However, I used that command as discussed in this similar writeup [ Heroku's trying to install development gems even after I've told it not to ] and it still doesn't work.
The line "Using --without development:test" in the push message below seems to indicate the BUNDLE_WITHOUT config command worked, so maybe this is a gemfile or other issue?
Thanks!
$ git push heroku
Counting objects: 64, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (42/42), done.
Writing objects: 100% (48/48), 6.03 KiB, done.
Total 48 (delta 15), reused 0 (delta 0)
-----> Heroku receiving push
-----> Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
Using --without development:test
Fetching source index for http://rubygems.org/
Installing rake (0.8.7)
Installing ZenTest (4.5.0)
Installing abstract (1.0.0)
Installing activesupport (3.0.3)
Installing builder (2.1.2)
Installing i18n (0.5.0)
Installing activemodel (3.0.3)
Installing erubis (2.6.6)
Installing rack (1.2.2)
Installing rack-mount (0.6.14)
Installing rack-test (0.5.7)
Installing tzinfo (0.3.25)
Installing actionpack (3.0.3)
Installing mime-types (1.16)
Installing polyglot (0.3.1)
Installing treetop (1.4.9)
Installing mail (2.2.15)
Installing actionmailer (3.0.3)
Installing arel (2.0.9)
Installing activerecord (3.0.3)
Installing activeresource (3.0.3)
Installing autotest (4.4.6)
Installing sys-uname (0.8.5) with native extensions
Installing autotest-fsevent (0.2.5) with native extensions /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:483:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/usr/ruby1.8.7/bin/ruby extconf.rb
extconf.rb:19: Only Darwin (Mac OS X) systems are supported (RuntimeError)
Gem files will remain installed in /disk1/tmp/build_258oz7hi5972n/.bundle/gems/ruby/1.8/gems/autotest-fsevent-0.2.5 for inspection.
Results logged to /disk1/tmp/build_258oz7hi5972n/.bundle/gems/ruby/1.8/gems/autotest-fsevent-0.2.5/ext/fsevent/gem_make.out
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `each'
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:446:in `build_extensions'
from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/installer.rb:198:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/source.rb:95:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:55:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `send'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.7/bin/bundle:13
from /usr/ruby1.8.7/bin/bundle:19:in `load'
from /usr/ruby1.8.7/bin/bundle:19
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
error: hooks/pre-receive exited with error code 1
To git#heroku.com:blooming-mountain-199.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:blooming-mountain-199.git'
Gemfile...
source 'http://rubygems.org'
gem 'rails', '3.0.3'
gem 'sqlite3', '1.3.3', :require => 'sqlite3'
gem 'gravatar_image_tag', '1.0.0.pre2'
gem 'will_paginate', '3.0.pre2'
gem "nokogiri"
gem "geokit"
gem "rack", "~>1.1"
group :development, :test do
gem 'rspec-rails', '2.5.0'
gem 'annotate-models', '1.0.4'
gem 'faker', '0.3.1'
gem 'autotest-fsevent' if RUBY_PLATFORM =~ /darwin/
gem 'rspec', '2.5.0'
gem 'webrat', '0.7.1'
gem 'spork', '0.9.0.rc4'
gem 'factory_girl_rails', '1.0'
gem 'ZenTest'
gem 'autotest'
gem 'autotest-rails'
gem 'autotest-growl'
end
Well, the problem is clearly with the autotest-fsevent getting loaded when you push to Heroku, which is not Darwin-based. Although you do have a conditional following the gem 'autotest-fsevent' statement, the gem is still trying to load when you deploy to Heroku. There are two likely causes for this.
The first, is that another gem is requiring it. If nothing else, autotest-growl should also be Darwin-only. I'm not sure these are related, but I'd still double-check.
The next issue is to make sure that Gemfile.lock isn't getting pushed. If you last ran bundle install on Darwin, it's possible that the gem got locked into the dependencies that way. git rm Gemfile.lock before you commit and push to Heroku.
Finally, my favored solution is not to use autotest. I'm not sure if that's an option for you, but I found it to be annoying when I did use it I use RSpec and Cucumber. I realize this last suggestion is a non-answer, but I don't like including platform-dependent gems even in testing, just because when you go to staging, little annoyances like this have a tendency of cropping up.
I'm not sure why Rails Tutorial is still using ZenTest and autotest, I don't know anyone who does... that might be changing, a friend went to the Rails Tutorial session at RailsConf and said Michael was actually noting errata during the tutorial, so maybe it'll be different in a future version.
As a final note, out of curiosity, if you are on OS X, how did you install Ruby? It's in a very odd place.