Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 自定义主页未显示在Heroku部署上_Ruby On Rails_Heroku - Fatal编程技术网

Ruby on rails 自定义主页未显示在Heroku部署上

Ruby on rails 自定义主页未显示在Heroku部署上,ruby-on-rails,heroku,Ruby On Rails,Heroku,我刚开始使用rails,一直在将我的迷你应用程序部署到heroku作为练习。除了主页外,一切似乎都很好。无论我做了什么,我仍然会看到“欢迎加入,您正在乘坐Ruby on Rails”页面。我已删除public/index.html,并在routes.rb中包含以下行: root to: 'static_pages#home' 这在我自己的机器上运行良好,但在部署到Heroku时拒绝工作。知道会发生什么吗 编辑:以下是my routes.rb的其余部分,不确定是否有帮助: SampleApp::

我刚开始使用rails,一直在将我的迷你应用程序部署到heroku作为练习。除了主页外,一切似乎都很好。无论我做了什么,我仍然会看到“欢迎加入,您正在乘坐Ruby on Rails”页面。我已删除public/index.html,并在routes.rb中包含以下行:

root to: 'static_pages#home'
这在我自己的机器上运行良好,但在部署到Heroku时拒绝工作。知道会发生什么吗

编辑:以下是my routes.rb的其余部分,不确定是否有帮助:

SampleApp::Application.routes.draw do
  resources :users
  resources :sessions, only: [:new, :create, :destroy]
  resources :comments

  match '/signup',   to: 'users#new'
  match '/signin',   to: 'sessions#new'
  match '/signout',  to: 'sessions#destroy', via: :delete

  root to: 'static_pages#home'

  match '/about',   to: 'static_pages#about'
  match '/contact', to: 'static_pages#contact' 
end

通过执行以下操作删除public/index.html文件

git rm public/index.html
git add (any other files you want to the commit) #optional
git commit -m "removing public index"
git push heroku master

因为,heroku执行基于git的部署-仅从本地删除没有帮助。

通过执行以下操作删除public/index.html文件

git rm public/index.html
git add (any other files you want to the commit) #optional
git commit -m "removing public index"
git push heroku master

因为,heroku进行了基于git的部署-仅从本地删除不会有帮助。

Index.php??我不确定那是不是…哇,对不起。一天剩下的时间都在用PHP编程。我删除了index.html。如果您已删除并且确定已删除。并重新启动了应用程序。(我不知道如何在heroku上执行此操作。)你确定没有缓存它。如果您的路线有问题,请将剩余部分张贴出来(请:)Index.php??我不确定那是不是…哇,对不起。一天剩下的时间都在用PHP编程。我删除了index.html。如果您已删除并且确定已删除。并重新启动了应用程序。(我不知道如何在heroku上执行此操作。)你确定没有缓存它。如果您的路线有问题,请将剩余部分张贴出来(请:)