bschreck
bschreck

Reputation: 724

Deploying RoR App fails because of Sqlite3 (tried other posts already)

I haven't been able to push my Ruby on Rails app to Heroku because it keeps trying to install sqlite3, and Heroku only uses Postgresql. I've followed the instructions of these posts:

Deploying RoR app to Heroku with Sqlite3 fails

Can't push to heroku - sqlite3.h is missing

Setting my sqlite3 gem to only be used in the development and test group, and making sure other gems aren't dependent on it, and making sure I do a git commit beforehand. It still gives me the same "sqlite3.h is missing" error. The one thing I've noticed is that when I run the "gem dependency" command I found a few gems that were dependent on sqlite3 in the development phase, which I thought was ok, but maybe it isn't. I can't find where those gems are being installed though. They are:

Gem acts-as-taggable-on-2.3.3

Gem client_side_validations-3.2.1

Gem cucumber-rails-1.3.0

Gem factory_girl-4.1.0

Gem fixture_builder-0.3.4

Gem kaminari-0.14.1

Gem orm_adapter-0.4.0

And each lists something like "sqlite3 (>= 0, development)" as a dependency. Anyone have any ideas?

--EDIT--

Here's my gem file:

source 'https://rubygems.org'
gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
#group :development, :test do
#   gem 'sqlite3'
#end
group :production do
  gem 'thin'
  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'
  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby
  gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
#gem 'devise'
# #gem 'omniauth'
gem 'omniauth-facebook'

Upvotes: 1

Views: 1668

Answers (2)

bschreck
bschreck

Reputation: 724

I figured it out. I was working off a different branch than the master, but pushing the master. Once I changed that it worked. Thanks everyone for helping!

Upvotes: 4

Nich
Nich

Reputation: 1102

try this, use sqlite3 in ur development and test, but pg on production

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

group :production do
        gem 'thin'
    gem 'pg'
end

Upvotes: 3

Related Questions