2

我第一次给 Heroku 一个旋转,但即使让我的应用程序在不崩溃的情况下打开也有相当多的困难。在寻找这个问题的答案时,堆栈溢出的好人建议我运行

heroku run rake db:migrate

但是,当我这样做时,我始终会收到此错误

rake aborted!
No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

当我用它运行跟踪时,我得到了这个

/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rake/application.rb:598:in `raw_load_rakefile'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rake/application.rb:89:in `block in load_rakefile'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rake/application.rb:160:in `standard_exception_handling'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rake/application.rb:88:in `load_rakefile'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rake/application.rb:72:in `block in run'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rake/application.rb:160:in `standard_exception_handling'
/app/vendor/ruby-2.0.0/lib/ruby/2.0.0/rake/application.rb:70:in `run'
/app/bin/rake:41:in `<main>'

我一直在寻找答案几个小时,但我似乎找不到解决这个问题的答案。有可能我只是不知道在哪里看。任何类型的线索都会有成倍的帮助。谢谢!

编辑

已经采取的步骤:

git init
git add .
git commit -m "init"
heroku create
git push heroku master

这就是我试图跑的地方

heroku open

收到错误,并尝试解决此问题

heroku run rake bd:migrate
4

1 回答 1

1

确保您可以在本地运行它。cd 你的项目并输入:

bundle exec gem list rake

如果您在此处看不到它,请尝试通过键入以下内容将其添加到您的 Gemfile 中:

echo "gem 'rake'" >> Gemfile

然后bundle && git push heroku master

于 2013-11-11T01:34:01.270 回答