【问题标题】:git push heroku master failed / RoR appgit push heroku master 失败 / RoR 应用程序
【发布时间】:2018-07-31 19:37:32
【问题描述】:

我正在尝试使用命令 git push heroku master 推送 heroku 文件夹,但失败了。我的日志是:

【问题讨论】:

    标签: ruby-on-rails git heroku


    【解决方案1】:

    --> 移动到你的项目文件夹

    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>
    

    【讨论】:

      【解决方案2】:

      更新:

      宝石文件

      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
      

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2013-03-21
        • 1970-01-01
        • 2021-05-19
        • 2013-09-05
        • 1970-01-01
        • 1970-01-01
        • 2015-08-12
        • 1970-01-01
        相关资源
        最近更新 更多