当前位置: 动力学知识库 > 问答 > 编程问答 >

ruby on rails - Git push heroku master not deploying app

问题描述:

I was developing an app on Ruby on Rails. I was successfully able to add, commit and push it to heroku using

$ git push heroku master

Later I switched back to previous commit using

git reset --head Head^1

I did all the changes and pushed it back to heroku. When I opened my app, no changes were made and it was still on a previous version. Changes are being shown in my localhost but not on the server.

I restarted my app using

$ heroku restart -app app-name

And here is the output when I restarted:

Restarting dynos... done

This is the output when I pushed my app to heroku after restarting

Counting objects: 9, done.

Delta compression using up to 2 threads.

Compressing objects: 100% (5/5), done.

Writing objects: 100% (5/5), 435 bytes | 0 bytes/s, done.

Total 5 (delta 4), reused 0 (delta 0)

remote: Compressing source files... done.

remote: Building source:

remote:

remote: -----> Ruby app detected

remote: -----> Compiling Ruby/Rails

remote: -----> Using Ruby version: ruby-2.2.0

remote: -----> Installing dependencies using 1.9.7

remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment

remote: Using i18n 0.7.0

remote: Using json 1.8.2

remote: Using rake 10.4.2

remote: Using minitest 5.5.1

remote: Using thread_safe 0.3.4

remote: Using builder 3.2.2

remote: Using erubis 2.7.0

remote: Using mini_portile 0.6.2

remote: Using rack 1.6.0

remote: Using mime-types 2.4.3

remote: Using arel 6.0.0

remote: Using execjs 2.3.0

remote: Using bcrypt 3.1.10

remote: Using sass 3.4.13

remote: Using net-ssh 2.9.2

remote: Using coffee-script-source 1.9.1

remote: Using thor 0.19.1

remote: Using orm_adapter 0.5.0

remote: Using ffi 1.9.8

remote: Using tilt 1.4.1

remote: Using hike 1.2.3

remote: Using multi_json 1.10.1

remote: Using kgio 2.9.3

remote: Using libv8 3.16.14.7

remote: Using mimemagic 0.3.0

remote: Using subexec 0.2.3

remote: Using pg 0.18.1

remote: Using bundler 1.9.7

remote: Using rails_serve_static_assets 0.0.4

remote: Using rails_stdout_logging 0.0.3

remote: Using raindrops 0.13.0

remote: Using ref 1.0.5

remote: Using dropbox-sdk 1.6.4

remote: Using tzinfo 1.2.2

remote: Using nokogiri 1.6.6.2

remote: Using rack-test 0.6.3

remote: Using warden 1.2.3

remote: Using mail 2.6.3

remote: Using autoprefixer-rails 5.1.7

remote: Using uglifier 2.7.0

remote: Using net-sftp 2.1.2

remote: Using coffee-script 2.3.0

remote: Using figaro 1.1.0

remote: Using sys-uname 0.9.0

remote: Using haml 4.0.6

remote: Using sprockets 2.12.3

remote: Using rails_12factor 0.0.3

remote: Using unicorn 4.8.3

remote: Using therubyracer 0.12.1

remote: Using activesupport 4.2.0

remote: Using bootstrap-sass 3.3.3

remote: Using mini_magick 3.8.0

remote: Using loofah 2.0.1

remote: Using imagemagick-binaries 6.8.7.5.1

remote: Using rails-html-sanitizer 1.0.1

remote: Using rails-deprecated_sanitizer 1.0.3

remote: Using globalid 0.3.3

remote: Using activemodel 4.2.0

remote: Using climate_control 0.0.3

remote: Using jbuilder 2.2.8

remote: Using pundit 0.3.0

remote: Using rails-dom-testing 1.0.5

remote: Using activejob 4.2.0

remote: Using activerecord 4.2.0

remote: Using carrierwave 0.10.0

remote: Using cocaine 0.5.7

remote: Using actionview 4.2.0

remote: Using polyamorous 1.1.0

remote: Using carrierwave-dropbox 1.2.1

remote: Using carrierwave-ftp 0.2.8

remote: Using paperclip 4.3.0

remote: Using actionpack 4.2.0

remote: Using paperclip-dropbox 1.3.2

remote: Using actionmailer 4.2.0

remote: Using railties 4.2.0

remote: Using sprockets-rails 2.2.4

remote: Using kaminari 0.16.3

remote: Using ransack 1.6.3

remote: Using simple_form 3.1.0

remote: Using mail_form 1.5.1

remote: Using coffee-rails 4.1.0

remote: Using responders 2.1.0

remote: Using font-awesome-rails 4.3.0.0

remote: Using jquery-rails 4.0.3

remote: Using sass-rails 5.0.1

remote: Using lightbox2-rails 2.7.1

remote: Using rails 4.2.0

remote: Using turbolinks 2.5.3

remote: Using devise 3.4.1

remote: Using jquery-datatables-rails 3.2.0

remote: Using devise_invitable 1.4.1

remote: Using upmin-admin 0.1.01

remote: Bundle complete! 34 Gemfile dependencies, 92 gems now installed.

remote: Gems in the groups development and test were not installed.

remote: Bundled gems are installed into ./vendor/bundle.

remote: Bundle completed (1.07s)

remote: Cleaning up the bundler cache.

remote: -----> Preparing app for Rails asset pipeline

remote: Running: rake assets:precompile

remote: Asset precompilation completed (5.58s)

remote: Cleaning assets

remote: Running: rake assets:clean

remote:

remote: ###### WARNING:

remote: No Procfile detected, using the default web server (webrick)

remote: https://devcenter.heroku.com/articles/ruby-default-web-server

remote:

remote: -----> Discovering process types

remote: Procfile declares types -> (none)

remote: Default types for Ruby -> console, rake, web, worker

remote:

remote: -----> Compressing... done, 155.5MB

remote: -----> Launching... done, v123

remote: https://app-name.herokuapp.com/ deployed to Heroku

remote:

remote: Verifying deploy.... done.

To https://git.heroku.com/app-name.git

6cb4846..275460b master -> master

网友答案:

Later I switched back to previous commit using

git reset --head Head^1

Since you've rewrote history, a normal push won't be accepted as it is not a fast forward.

There are two possible solutions:

  1. Force push your current branch:

    $ git push -f heroku master
    
  2. If all what you want is to have the previous live version back, run a rollback:

    $ heroku rollback
    
网友答案:

Restart your heroku app and check again. Here is the command

heroku restart -a app_name
分享给朋友:
您可能感兴趣的文章:
随机阅读: