Heroku:部署rails应用程序的麻烦 [英] Heroku: Deploying rails application troubles

查看:155
本文介绍了Heroku:部署rails应用程序的麻烦的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试用heroku部署我的rails应用程序(如 here 所示)。我创建了一个非常简单的rails应用程序(使用ruby 1.9.2和rails 3.0.3;我确定英雄支持这些 - 见英雄文档),创建并推送github repo,创建heroku repo并推送它(所有提交是完成)。当我试图访问我的应用程序控制器时,它会抛出404 rails页面,就像说没有这样的控制器。我已经做了 heroku rake db:migrate 但是第一次我跑了我有'主机找不到'错误。再次运行这个修复。嗯,我不知道我是否应该运行 heroku addons add:postgresql - 我虽然postgres是默认开启,但heroku说我应该付钱为了得到DB(运行命令我提到要求我确认计费)。



可能听起来很愚蠢,但是如何部署我的rails应用程序(这是一个非常简单的)没有支付任何费用和像我在帖子开头提到的404页面的麻烦? (这是我的问题)。也许我应该选择其他的主机(如果它存在于我们的世界)或者我在做什么与heroku错误?

解决方案

你忘了将您的 quotes_controller.rb 推送到git和heroku。

  git添加控制器/ quotes_controller.rb 

似乎你忘了模型,也许很多文件。 p>

I'm trying to deploy my rails application with heroku (as shown here). I've created a very simple rails application (using ruby 1.9.2 and rails 3.0.3; i'm sure heroku supports these - see heroku docs), created and pushed github repo, created heroku repo and pushed it (all commiting is done). And when i'm trying to access my application controller, it throws 404 rails page like it's saying 'there is no such controller'. I've done heroku rake db:migrate but first time i ran it i got 'host not found' error. Running this again fixed that. Well, i'm not sure if i should run heroku addons add:postgresql - i though postgres is on by default, but heroku says i should pay in order to get DB (running command i've mentioned asks me to confirm billing it).

May be it sounds stupid, but how can i deploy my rails application (it's a very simple one) without paying any fees and such troubles as 404 pages like i mentioned in the beginning of my post? (and this is my question). Maybe i should choose other hosting (if it exists in our world) or am i doing something wrong with heroku?

解决方案

You forgot to push your quotes_controller.rb to git and heroku probably.

git add controllers/quotes_controller.rb

it seems you forgot models also, and probably lot of files.

这篇关于Heroku:部署rails应用程序的麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆