git push heroku master failed / RoR app

时间:2018-02-21 09:26:03

标签: ruby-on-rails git heroku

我试图使用命令git push heroku master推送一个heroku文件夹,但它失败了。我的日志是: enter image description here

2 个答案:

答案 0 :(得分:0)

- >移至项目文件夹

cd /location

首先检查您的状态

git status

添加文件

git add

立即提交

git commit -m “Commit Now”

使用您的远程位置/地址

git remote add origin https://github.com/user/projname.git

查看遥控器

git remote -v

立即推送

git push <remote> <branch>

强制推送

git push -f <remote> <branch>

答案 1 :(得分:-1)

更新:

Gemfile

group :development, :test do
 # Call 'byebug' anywhere in the code to stop execution and get a  debugger console
 gem 'byebug'
 # Use sqlite3 as the database for Active Record
gem 'sqlite3'
end
group :development do
 # Access an IRB console on exception pages or by using <%= console  %> in views
gem 'web-console', '~> 2.0'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
 gem 'spring'

end

group :production do
gem 'pg', '~> 0.11'
gem 'rails_12factor'
end

除了那些宝石外所有其他宝石必须在顶部,我们应该使用'pg'gem进行生产,使用'sqlite3'进行开发