2012-07-18 254 views
0

希望了解如何使用Heroku部署Rails 2.3.8。当我尝试推送到heroku时,出现以下错误消息:错误:将Rails 2.3.8应用程序部署到heroku

git push heroku master 
    Enter passphrase: 
    Counting objects:3, done. 
    Compressing objects: 100 % (2/2), done. 
    Writing onject: 100 % (3/3), 4.34 KiB, done. 
    Total 3 (delta 0), reused 0 (delta 0) 

    -----> Heroku receiving push 
    Heroku push rejected, no Cedar-supported app detected 

    To [email protected]: falling-sunrise.git 
    [remote rejected] master -> master (pre-receive hook declined) 
    error: failed to push some refs to '[email protected]:falling-sunrise.git' 

我还附加了我的命令行屏幕的实际屏幕截图。我读了一些地方,我可能不得不写一个gemfile来推动工作。我也这样做,并将其添加到我的应用程序的根,但没有运气。

+1

家伙谢谢你的帮助。只是想出了什么是错的。我从来没有真的推铁路的应用程序!我是Git的新手,并没有意识到你需要在提交之前添加每个文件 – user1536340 2012-07-19 23:23:19

+0

请注意,如果你懒惰,并确定你的测试通过,你可以'git commit -a -m'commit这里的消息“提交工作目录中的所有修改和新文件。如果你只是改变了一堆文件,并且/或者重新生成了一些静态内容,这很有用。 – elithrar 2012-07-20 02:16:32

回答

0

你能提供你的应用程序的布局吗?确保在本地运行bundle install并检查您的Gemfile;它可能没有正确配置,或者您没有将新文件(包括重要的Gemfile.lock)添加到git中。

另见https://devcenter.heroku.com/articles/ruby-support#rails_2x_applications

+0

我的布局是这样的: -.git -app -config -console -db -doc -Gemfile -Gemfile.lock -lib -log -public -Rakefile -readme -script -test -tmp -vendor – user1536340 2012-07-19 22:22:16

+0

而且我在编写gemfile之后运行了bundle install。并将所有新文件推送到git – user1536340 2012-07-19 22:24:24

0

尝试捆绑你的Gemfile,并确保它是完整的。如果不工作,你可以尝试推你的应用竹堆栈:

https://devcenter.heroku.com/articles/bamboo

+0

请注意,您无法将*从* Cedar迁移到Bamboo。您需要在Bamboo堆栈上创建一个新应用程序。 – elithrar 2012-07-19 03:08:17

+0

这次我尝试推送应用程序到一个竹栈,并收到不同的错误:“Heroku推拒绝,没有Rails或Rack应用程序检测到 – user1536340 2012-07-19 22:31:46

+0

这仍然是”相同“的错误 - Heroku不知道如何处理你的应用程序。就像你对它进行分类。 – elithrar 2012-07-20 02:15:21

相关问题