0
我在部署我的Rails API後端時遇到404錯誤。日誌不會顯示我可以排除故障的任何明顯錯誤。日誌如下。Heroku上的404錯誤
我真的很感謝您的任何幫助或指導。謝謝!
Rails.application.routes.draw do
resources :favorites
resources :users
resources :artworks
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.3.3
-----> Installing dependencies using bundler 1.13.7
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.14.3). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching gem metadata from https://rubygems.org/.........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Using rake 12.0.0
Using concurrent-ruby 1.0.4
Using i18n 0.8.0
Using minitest 5.10.1
Using thread_safe 0.3.5
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using rack 2.0.1
Using nio4r 1.2.1
Using websocket-extensions 0.1.2
Using mime-types-data 3.2016.0521
Using arel 7.1.4
Using method_source 0.8.2
Using pg 0.19.0
Using puma 3.7.0
Using rack-cors 0.4.0
Using bundler 1.13.7
Using thor 0.19.4
Using tzinfo 1.2.2
Using faker 1.7.2
Using nokogiri 1.7.0.1
Using websocket-driver 0.6.5
Using mime-types 3.1
Using rack-test 0.6.3
Using sprockets 3.7.1
Using activesupport 5.0.1
Using loofah 2.0.3
Using mail 2.6.4
Using rails-dom-testing 2.0.2
Using globalid 0.3.7
Using activemodel 5.0.1
Using rails-html-sanitizer 1.0.3
Using activejob 5.0.1
Using activerecord 5.0.1
Using actionview 5.0.1
Using actionpack 5.0.1
Using actioncable 5.0.1
Using actionmailer 5.0.1
Using railties 5.0.1
Using sprockets-rails 3.2.0
Using rails 5.0.1
Bundle complete! 11 Gemfile dependencies, 42 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into ./vendor/bundle.
Bundle completed (3.60s)
Cleaning up the bundler cache.
Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.14.3). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
-----> Detecting rake tasks
-----> Discovering process types
Procfile declares types -> web
Default types for buildpack -> console, rake, worker
-----> Compressing...
Done: 24.7M
-----> Launching...
Released v11
https://still-crag-23724.herokuapp.com/ deployed to Heroku
感謝您的幫助。我試過Heroku重新啓動,它沒有工作,我包括我上面的routes.rb。 – Kep
如果您訪問應用程序的網址,它什麼都不顯示,但如果您添加「/ favorites」或「/ users」,它會顯示您的工作。我建議你添加根路由'根「收藏夾#索引」'或任何其他匹配你的應用程序,所以主網址總是重定向到你的應用程序的某些部分。 –
我真的很感激你的幫助 - 設置根路線的工作!再次感謝你,真的很棒。 – Kep