I created a page in rails with a SignUp sườn and it works great locally, everything was fine, so sánh I deployed the project in Heroku, where the statics_page's works perfectly, but this Form is not working and is throwing u the error:
We're sorry, but something went wrong.
If you are the application owner kiểm tra the logs for more information.
So I reviewed the log, where everything loads fine until this comes up in red:
2020-01-26T02:13:09.077537+00:00 heroku[router]: at=info method=GET path="/signup" host=safe-shelf-03588.herokuapp.com request_id=a96a3ba1-41ed-4963-8f6a-5cd3676954ff fwd="181.115.249.233" dyno=web.1 connect=0ms service=5ms status=500 bytes=1891 protocol=https
I reviewed forums and the most logical reason was đồ sộ review routes, but error 500 is a very common issue code for different reasons and I had no luck...
This is my routes.rb file:
Rails.application.routes.draw do
get 'users/new'
root 'static_pages#home'
get '/help', to: 'static_pages#help'
get '/about', to: 'static_pages#about'
get '/contact', to: 'static_pages#contact'
get '/signup', to: 'users#new'
resources :users
end
this is my database.yml:
default: &default
adapter: postgresql
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
timeout: 5000
development:
<<: *default
database: 'my_app_development'
test:
<<: *default
database: 'my_app_test'
production:
<<: *default
database: sample_app_production
username: sample_app
password: <%= ENV['SAMPLE_APP_DATABASE_PASSWORD'] %>
my Procfile:
web: bundle exec puma -C config/puma.rb
and my puma.rb tệp tin just in case:
workers Integer(ENV['WEB_CONCURRENCY'] || 2)
threads_count = Integer(ENV['RAILS_MAX_THREADS'] || 5)
threads threads_count, threads_count
preload_app!
rackup DefaultRackup
port ENV['PORT'] || 3000
environment ENV['RACK_ENV'] || 'development'
on_worker_boot do
# Worker specific setup for Rails 4.1+
# See: https://devcenter.heroku.com/articles/
# deploying-rails-applications-with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
end