将基本 Ruby on Rails 应用程序推送到 Heroku 时遇到问题
我正在学习 Rails 教程的第一章。我将first_app推送到heroku。起初我收到了 sqlite3 错误(我认为)。但是,我编辑了 gemfile 并再次将其推送到 heroku。但是,我没有得到与以下相同的页面: http: //railstutorial.org/ruby-on-rails-tutorial-book#sec:1.4.3 (我认为它应该类似于第 1.4.3 节中的图 1.11)
相反,我得到的是: http://blooming-samurai-546.heroku.com/
它只是说: 赫罗库 |欢迎使用您的新应用程序! 如果您需要部署帮助,请参阅文档。
我做错了什么吧?有什么想法吗?
I was working through the first chapter of the Rails Tutorial. I pushed first_app to heroku. At first I was getting the sqlite3 error (I think). But, I edited the gemfile and pushed it up to heroku again. But, I don't get the same page as on: http://railstutorial.org/ruby-on-rails-tutorial-book#sec:1.4.3 (I think it's supposed to look like Figure 1.11 in section 1.4.3)
Instead, I get this: http://blooming-samurai-546.heroku.com/
It just says:
Heroku | Welcome to your new app!
Refer to the documentation if you need help deploying.
I did something wrong right? Any ideas what?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在你的 git 控制台中尝试:
看起来你什么都没有推送到 heroku,所以它创建了一个空目录。
In your git console try:
It looks like you pushed to heroku with nothing so it created an empty directory.
我也遇到了同样的问题,并且对此感到非常沮丧。对我来说解决这个问题的是移动
宝石'sqlite3'
进入下面的块
组:开发,:测试
在 Gemfile 中。
之后,不再看到这些类型的消息:
在终端中输入
git Push heroku
或git Push Heroku master
希望这有帮助。
I had this same issue and was very frustrated by it. What solved the issue for me was moving
gem 'sqlite3'
into the block following
group :development, :test
in the Gemfile.
After that, no longer saw these kinds of messages:
in terminal after typing
git push heroku
orgit push heroku master
Hope this helps.
无法与成功争论。
然而,在使用 $ git push heroku master 推送 master 之前,有些人可能需要运行以下命令:
$ git remote add heroku [电子邮件受保护]:your-heroku-url-goes-here.git,
如当前“Git Remotes 和 Heroku”部分中所述:
http://devcenter.heroku.com/articles/git
Can’t argue with success.
However, before pushing the master with $ git push heroku master some folks may need to run the following command:
$ git remote add heroku [email protected]:your-heroku-url-goes-here.git
as discussed in the “Git Remotes and Heroku” section currently at:
http://devcenter.heroku.com/articles/git