Search code examples
ruby-on-railsrubygithub-pages

Github Pages return 404 error


I have several github repos that I'm trying to publish as github pages. I've created gh-pages branches for them and their repo's say that the pages exist, but when I go to the links they provide I find a 404 page.

I know that github pages are finicky and return this error if the home page isn't called "index.html" and I suspect that the problem is related to that, but I'm not sure how to fix it. All of the projects in question are rails apps with homepages in the views/home called "index.html.erb" and routes designating those pages as root. Do I need to rename those pages or there some other way to fix this?


Solution

  • Github pages is used only for static websites, you cannot host applications on it. You wrote that you hosted *.html.erb files, which means you are trying to setup a rails application on it.

    You can use static website builders to create Github sites, or code them on your own.