ruby-on-railsherokurubygemsbundlerdiaspora

error while deploying diaspora on heroku Failed to install gems via Bundler


i am trying to deploy diaspora on heroku but getting this error while deploying am using rails 4.1.8 with ruby 2.0.0 on ubuntu 14.04 I had tried bundle update but it doesn't worked..any solution..??

> ahmed@ahmed-desktop:~/diaspora$ git push -u heroku heroku:master
> Counting objects: 132081, done.
> Delta compression using up to 2 threads.
> Compressing objects: 100% (29619/29619), done.
> Writing objects: 100% (132081/132081), 91.87 MiB | 163.00 KiB/s, done.
> Total 132081 (delta 101146), reused 132070 (delta 101138)
> remote: Compressing source files... done.
> remote: Building source:
> remote:
> remote: -----> Deleting 6 files matching .slugignore patterns.
> remote: -----> Ruby app detected
> remote: -----> Compiling Ruby/Rails
> remote: -----> Using Ruby version: ruby-2.0.0
> remote: -----> Installing dependencies using 1.7.12
> remote:        Running: bundle install --without development:test --path
> vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
> remote:        You are trying to install in deployment mode after changing
> remote:        your Gemfile. Run `bundle install` elsewhere and add the
> remote:        updated Gemfile.lock to version control.
> remote:        You have deleted from the Gemfile:
> remote:        * mysql2 (= 0.3.16)
> remote:        Bundler Output: You are trying to install in deployment
> mode after changing
> remote:        your Gemfile. Run `bundle install` elsewhere and add the
> remote:        updated Gemfile.lock to version control.
> remote:
> remote:        You have deleted from the Gemfile:
> remote:        * mysql2 (= 0.3.16)
> remote:  !
> remote:  !     Failed to install gems via Bundler.
> remote:  !
> remote:
> remote:  !     Push rejected, failed to compile Ruby app
> remote:
> remote: Verifying deploy...
> remote:
> remote: !    Push rejected to reddodo.
> remote:
> To https://git.heroku.com/reddodo.git
>  ! [remote rejected] heroku -> master (pre-receive hook declined)
> error: failed to push some refs to 'https://git.heroku.com/reddodo.git'

Solution

  • You skipped part of the installation instructions, namely:

    We need to switch the Gemfile.lock to PostgreSQL. Edit Gemfile and change ENV['DB'] ||= 'mysql' to ENV['DB'] ||= 'postgres'. Then run:

    bundle --without development test heroku production assets
    git add Gemfile Gemfile.lock
    git commit -m "switch Gemfile.lock to pg exclusivly"