Heroku Rails安装程序“您正在查找的页面不存在。” [英] Heroku Rails Setup "The page you were looking for doesn't exist."
问题描述
我遵循
I'm following this Rails tutorial. When I run rails server locally, I can see the "Welcome Aboard" page. However, when deploying to Heroku, it shows "The page you were looking for doesn't exist." I've searched around but couldn't find anything to solve my problem. Below are my steps:
rails new first_app
Make this change to Gemfile:
group :production do
gem 'pg'
end
group :development do
gem 'sqlite3'
end
Then,
bundle update
bundle install
bundle install --without production
rake assets:precompile
git init
git add .
git commit -m "initial commit"
heroku login
heroku create
git push heroku master
heroku open
At this point it opens the address for the heroku app and gives the "doesn't exist" error. When checking 'heroku logs' it shows the status=404 of my visit:
Beginning in Rails 4, the "Welcome Aboard" page is no longer a static page located in the public
directory, it is a smoke page located within the Rails framework itself. This page will only be shown in the development mode, so when you've deployed to Heroku and are running in production
mode, you won't get an automatic start page. You'll need to add a root
route otherwise you'll get the error you are seeing.
see: Where is the default "Welcome Aboard" page located in my app?
这篇关于Heroku Rails安装程序“您正在查找的页面不存在。”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!