Reputation: 3
I am trying to set up my app on Heroku and as I understand it the issue I am having is resulting from trying to run rake figaro:heroku
Every time I run it I get the following error:
rake aborted!
LoadError: cannot load such file -- sqlite3/database
C:/Users/Zac/GitHub/Bitsy/config/application.rb:7:in `<top (required)>'
C:/Users/Zac/GitHub/Bitsy/Rakefile:4:in `<top (required)>'
My gem file is set up as such:
source 'https://rubygems.org'
ruby '1.9.3'
gem 'rails', '4.0.4'
gem 'sass-rails', '~> 4.0.2'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.2'
gem 'bootstrap-sass', '~> 3.2.0'
gem 'autoprefixer-rails'
gem "paperclip", "~> 3.0"
gem "paperclip-dropbox", ">= 1.1.7"
gem "figaro"
gem 'devise'
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :development, :test do
gem 'sqlite3'
end
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
And my database.yml is as:
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
test:
adapter: sqlite3
database: db/test.sqlite3
pool: 5
timeout: 5000
production:
adapter: sqlite3
database: db/production.sqlite3
pool: 5
timeout: 5000
I have changed the production adapter and database previously and it doesn't seem to make a difference. I have spent about 5 hours searching for help on this to no avail so if anyone could point me in the right direction I would be very appreciative.
Upvotes: 0
Views: 106
Reputation: 1582
you cannot use sqlite3 on Heroku.. you have to use Postgres (you may already know that).
You should try to use the same db in development as production to avoid inconsistencies, so in this case, use PG in every environment.
.. but to fix your problem, try changing the database.yml production entry to:
production:
adapter: postgresql
database: your_app_production
pool: 5
timeout: 5000
that should work
Upvotes: 1