简体   繁体   English

git push heroku master似乎不起作用

[英]git push heroku master doesn't seem to work

I am following the guide on railstutorial.org. 我正在关注railstutorial.org上的指南。 I get this error when I type the command on the title. 当我在标题上键入命令时,我收到此错误。

Counting objects: 66, done. 计数对象:66,完成。 Delta compression using up to 2 threads. Delta压缩最多使用2个线程。 Compressing objects: 100% (52/52), done. 压缩对象:100%(52/52),完成。 Writing objects: 100% (66/66), 86.47 KiB, done. 书写对象:100%(66/66),86.47 KiB,完成。 Total 66 (delta 3), reused 0 (delta 0) 总计66(delta 3),重复使用0(delta 0)

-----> Heroku receiving push -----> Rails app detected -----> Detected Rails is not set to serve static_assets Installing rails3_serve_static_assets... done -----> Gemfile detected, running Bundler version 1.0.0 Unresolved dependencies detected; -----> Heroku接收推送----->检测到Rails app ----->检测到的Rails没有设置为static_assets服务安装rails3_serve_static_assets ...完成----->检测到Gemfile,运行Bundler版本1.0.0检测到未解析的依赖项; Installing... You have modified your Gemfile in development but did not check the resulting snapshot (Gemfile.lock) into version control 安装...您已在开发中修改了Gemfile,但未将生成的快照(Gemfile.lock)检入版本控制

   You have added to the Gemfile:
   * sqlite3-ruby (= 1.3.7)

   You have deleted from the Gemfile:
   * sqlite3-ruby (= 1.2.5)
   FAILED: http://docs.heroku.com/bundler

! Heroku push rejected, failed to install gems via Bundler Heroku推被拒绝,未能通过Bundler安装宝石

error: hooks/pre-receive exited with error code 1 To git@heroku.com:morning-mountain-34.git ! 错误:挂钩/预接收退出时显示错误代码1至git@heroku.com:washing-mountain-34.git! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'git@heroku.com:morning-mountain-34.git' [远程拒绝] master - > master(pre-receive hook拒绝)错误:未能将某些引用推送到'git@heroku.com:wash-mountain-34.git'

then when i type: 然后当我输入:

$ heroku open $ heroku开放

I get a mountain site:http://morning-mountain-34.heroku.com/ which isn't supposed to be the case: should be first_app 我得到一个山区网站:http://morning-mountain-34.heroku.com/这不应该是这样的:应该是first_app

found the solution: 找到了解决方案:

first the problem occured possibly because of the so many mistakes I made earlier that I kept on closing the terminal. 首先出现问题可能是因为我之前犯的那么多错误,我一直在关闭终端。

so things were probably disabled. 事情可能已经被禁用了。 like "git init" "git add ." 比如“git init”“git add”。 and "git commit -m" I don't really know which one but after doing all those and typing: git push heroku master. 和“git commit -m”我真的不知道哪一个,但在完成所有这些并输入之后:git push heroku master。

It finally went through and when I type: heroku open. 它终于通过,当我输入:heroku打开。 it still opens to morning-mountain-34 but it contains my first app now (which is nothing but its the one on the guide too :)) 它仍然打开到早上山34但它现在包含我的第一个应用程序(这只是指南上的那个:) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM