简体   繁体   English

Cloud9,GitHub和Heroku(您要查找的页面不存在。)

[英]Cloud9, GitHub and Heroku (The page you were looking for doesn't exist.)

I'm new to Ruby on Rails. 我是Ruby on Rails的新手。 I'm usin: / Cloud9 to make the ROR application / GitHub to store the files and update them / Hiroku for the production as a free service 我用:/ Cloud9制作ROR应用程序/ GitHub存储文件并更新它们/ Hiroku作为免费服务进行生产

When I run the application on Cloud9, it works properly: https://ruby2016-bbparis.c9users.io/ 当我在Cloud9上运行该应用程序时,它可以正常运行: https : //ruby2016-bbparis.c9users.io/

When I push it to GitHub, it doesn't work on Heroku, and I get : 当我将其推送到GitHub时,它在Heroku上不起作用,我得到:

The page you were looking for doesn't exist. 您要查找的页面不存在。 You may have mistyped the address or the page may have moved. 您可能输入了错误的地址,或者页面已经移动。 If you are the application owner check the logs for more information. 如果您是应用程序所有者,请检查日志以获取更多信息。

capture screen 拍摄画面

My route file is so simple : 我的路线文件非常简单:

Rails.application.routes.draw do

  root 'pages#home'

  get 'pages/about', to: 'pages#about'

end

How can I resolve this issue please ? 请问该如何解决?

I assume you already have heroku repository created. 我假设您已经创建了heroku存储库。 Try following command and it should work as your app works perfectly on c9 尝试遵循以下命令,它应该可以正常运行,因为您的应用程序可以在c9上完美运行

$ bundle update 

$ heroku run rake db:migrate

$ heroku run rake db:schema:load

$ git init

$ git add .

$ git commit -am "some comment"

$ git push heroku master

$ git push heroku master

$ heroku open

I know your page doesn't have even database yet. 我知道您的页面还没有数据库。 I had similar problem in past and it helped me to resolve same problem. 过去我有类似的问题,它帮助我解决了同样的问题。

run rake db:schema:load basically load your schema into current environment's database. 运行rake db:schema:load基本上将您的架构加载到当前环境的数据库中。 rake db:migrate does migration for current environment which not run yet for more info on rake db commands follow this rake db:migrate会针对当前尚未运行的环境进行迁移,有关rake db命令的更多信息,请遵循以下步骤

It is recommended to use postgres database in heroku because of tight integration with platform however there are many option for application currently running on MySQL . 由于与平台的紧密集成,建议在heroku中使用postgres数据库,但是当前在MySQL运行的应用程序有很多选择。 For more information on how you can migrate to postgres click here . 有关如何迁移到postgres更多信息, 请单击此处

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法在heroku上部署应用程序,总是得到“您要查找的页面不存在。”错误 - Can't deploy app on heroku, always get “The page you were looking for doesn't exist.” error Heroku Rails设置“您正在寻找的页面不存在。” - Heroku Rails Setup “The page you were looking for doesn't exist.” heroku“您要查找的页面不存在。”遵循Hartl的RoR指南 - heroku “The page you were looking for doesn't exist.” following Hartl's RoR guide 在商店上安装后的Heroku Shopify应用程序“您要查找的页面不存在。” - Heroku Shopify App after installation on shop “The page you were looking for doesn't exist.” rails heroku错误:未定义路线,但路线存在(您要查找的页面不存在。) - rails heroku error: no route defined, but route is there (The page you were looking for doesn't exist.) “您要查找的页面不存在。”编辑表单 - “The page you were looking for doesn't exist.” edit form 为什么当我在Heroku的另一个窗口中打开新链接时显示“您要查找的页面不存在”的原因。 - Why is it when I open a new link in another window on Heroku it says “The page you were looking for doesn't exist.” Heroku:您要查找的页面不存在 - Heroku: The page you were looking for doesn't exist 您所寻找的页面不存在 - Heroku The page you were looking for doesn't exist Rails / Heroku您正在寻找的页面不存在 - Rails/Heroku The page you were looking for doesn't exist
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM