无法发布到heroku

时间:2011-06-14 04:21:11

标签: ruby-on-rails ruby git installation heroku

我正在使用OS X.

ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]

rails -v
Rails 3.0.8

which ruby
/Users/apple/.rvm/rubies/ruby-1.9.2-p180/bin/ruby

which rails
/Users/apple/.rvm/gems/ruby-1.9.2-p180@rails3/bin/rails

当我使用命令git push heroku master时,我得到了

!     Heroku push rejected, no Rails or Rack app detected

To git@heroku.com:testingnewyork.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:testingnewyork.git'

我该怎么办?

2 个答案:

答案 0 :(得分:2)

类似于这个问题:push rails app to heroku

如果你没有在Rails应用程序中运行git命令,Heroku不知道你在推动什么:)

答案 1 :(得分:1)

您需要将目录更改为应用程序文件夹:

rails new testingnewyork
cd testingnewyork