gpt4 book ai didi

ruby - Heroku:找不到 Rake 文件

转载 作者:太空宇宙 更新时间:2023-11-03 16:28:40 25 4
gpt4 key购买 nike

我是第一次试用 Heroku,但即使让我的应用程序在不崩溃的情况下打开也有相当大的困难。在寻找这个问题的答案时,stack overflow 上的好心人建议我运行

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

最佳答案

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

bundle exec gem 列表抽取

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

echo "gem 'rake'">> Gemfile

然后 bundle && git push heroku master

关于ruby - Heroku:找不到 Rake 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19896581/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com