"heroku db: push" gives me: "Error loading cranes: there is no such file to load - sqlite3 ..."

By doing this:

bundle exec heroku db:push

I got it:

 !    Taps Load Error: no such file to load -- sqlite3
 !    You may need to install or update the taps gem to use db commands.
 !    On most systems this will be:
 !    
 !    sudo gem install taps

This is my database.yml file:

development:
  adapter: mysql2
  encoding: utf8
  database: g_dev
  pool: 5
  username: root
  password: 
+3
source share
2 answers

I debugged it.

I need to put the gem 'sqlite3' in the gemfile.

Because of this line 10 in cli.rb (taps-0.3.24):

require 'optparse'
require 'tempfile'
require 'taps/monkey'
require 'taps/config'
require 'taps/log'
require 'vendor/okjson'

Taps::Config.taps_database_url = ENV['TAPS_DATABASE_URL'] || begin
  # this is dirty but it solves a weird problem where the tempfile disappears mid-process
  require 'sqlite3'

In the source code of the taps ... :( I have no choice

+8
source

I had this problem, but simple enough:

gem install sqlite3

to make it available locally. That is, you do not need to pollute your gemfile with sqlite.

(Use sudo to suit your environment.)

0
source

All Articles