1

I am upgrading my existing application of rails 5.2.0 to 6.1.4

I followed the official upgrade guide as well as, this guide.

My rails version is 6.1.4.1 & my ruby version is 2.5.3 which satisfies the condition of running the app. Anybody could give me help on the directions of how to solve this issue ?

The problem, though, is when I try to run the server I get the following error:

> > Booting Puma
=> Rails 6.1.4.1 application starting in development
=> Run `bin/rails server --help` for more startup options
Exiting
Traceback (most recent call last):
    19: from bin/rails:9:in `<main>'
    18: from bin/rails:9:in `require'
    17: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/commands.rb:18:in `<top (required)>'
    16: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/command.rb:48:in `invoke'
    15: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/command/base.rb:69:in `perform'
    14: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
    13: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
    12: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
    11: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:135:in `perform'
    10: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:135:in `tap'
     9: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:144:in `block in perform'
     8: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:37:in `start'
     7: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-6.1.4.1/lib/rails/commands/server/server_command.rb:77:in `log_to_stdout'
     6: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
     5: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
     4: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
     3: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
     2: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
     1: from /Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:117:in `new_from_string'
/Users/heron/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rack-2.2.3/lib/rack/builder.rb:233:in `to_app': missing run or map statement (RuntimeError)
2
  • 2
    Looks like your config.ru file is invalid. Commented Aug 30, 2021 at 11:34
  • Well, All I did is changed run Rails.application to Rails.application.load_server after running the rails app:update task. But that's right, changing it back made it work. Commented Aug 30, 2021 at 12:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.