在rails mac os上的heroku推送代码错误ruby

时间:2015-07-03 08:40:25

标签: ruby-on-rails git macos heroku

这是我在mac终端和heroku主分支的输出:

[remote rejected] master -> master (pre-receive hook declined)
    error: failed to push some refs to 'https://git.heroku.com/projectname.git'
    In heroku
    -----> Ruby app detected
    -----> Compiling Ruby/Rails
    -----> Using Ruby version: ruby-2.0.0
    -----> Installing dependencies using 1.9.7
           Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
           You are trying to install in deployment mode after changing
           your Gemfile. Run `bundle install` elsewhere and add the
           updated Gemfile.lock to version control.
           You have added to the Gemfile:
           * ruby (= 2.0.0)
           * pg (= 0.17.1)
           Bundler Output: You are trying to install in deployment mode after changing
           your Gemfile. Run `bundle install` elsewhere and add the
           updated Gemfile.lock to version control.

           You have added to the Gemfile:
           * ruby (= 2.0.0)
           * pg (= 0.17.1)
     !
     !     Failed to install gems via Bundler.
     !
     !     Push rejected, failed to compile Ruby app

1 个答案:

答案 0 :(得分:0)

你可能需要先做Controller,这样你的gem.lock文件在推送到heroku之前是最新的.....