简体   繁体   中英

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?

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.

@bukk530 is absolutely correct.

Additionally, it would be worth noting that GitHub Pages does support hosting Jekyll sites, but nothing else. Static HTML/CSS/JavaScript and Jekyll.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM