alexmcruikshank
alexmcruikshank

Reputation: 13

Error with Rails / sqlite3 deployment to heroku postgresql -- have already updated gemfile and master

I am on a first time deploy from a local Rails environment with SQLite3 to Heroku with postgresql. I have already updated my gemfile to make the appropriate development/production group clauses. And I made sure to include those changes in the master. However, I repeatedly get the following error when I run the db:push

Would greatly appreciate the help

prompt> C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo
m_require.rb:36:in `require': LoadError: cannot load such file -- sqlite3 (Seque
l::AdapterNotFound)
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/adapters/sqlite.rb:1:in `<top (required)>'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/site_ruby/1.9.1/r
ubygems/custom_require.rb:36:in `require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:249:in `block in tsk_require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:72:in `block in check_requiring_thread'
        from <internal:prelude>:10:in `synchronize'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:69:in `check_requiring_thread'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:249:in `tsk_require'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/database/connecting.rb:25:in `adapter_class'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/database/connecting.rb:54:in `connect'
        from C:/Program Files (x86)/Heroku/ruby-1.9.2/lib/ruby/gems/1.9.1/gems/s
equel-3.20.0/lib/sequel/core.rb:119:in `connect'
        from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.23/lib/taps/sche
ma.rb:17:in `dump_table'
        from C:/Program Files (x86)/Heroku/vendor/gems/taps-0.3.23/bin/schema:32
:in `<main>'

Upvotes: 0

Views: 254

Answers (1)

Luis Lavena
Luis Lavena

Reputation: 10378

For heroku db:push command to work, you will need to install both taps and sqlite3 gems inside the version of Ruby Heroku bundles with it.

From the above backtrace, seems taps is installed, but is missing sqlite3 adapter.

To install it, please try the following:

  • Start an elevated command prompt (so you can write into Program Files without issues
  • cd "C:\Program Files (x86)\Heroku\ruby-1.9.2\bin" directory.
  • Invoke gem install sqlite3 --no-ri --no-rdoc

That should install the missing gem and allow heroku db:push to work with your sqlite3 database.

Hope that helps.

Upvotes: 1

Related Questions