NameError in WelcomeController#index

What happens when you run the tests in your app? Try these steps:

1. cd into project directory 2. bundle 3. rm db/test.sqlite 4. RAILS_ENV=test rake db:migrate 5. rake

If that last step doesn't cause your tests to start running, try replacing that step with bundle exec rspec spec

Nota bene: if you try this again later, you only need to re-run step 4 if you have made changes to the database structure with migrations (and none of the previous steps). You should be able to keep trying just step 5 (or the alternate, for rspec, as you make changes to the application to see if the tests pass now.

If the application was made a few years ago, as you said, then it wasn't made in Rails 5.2. How did you get it to that point? Do you have version control to step backwards if necessary for debugging?

If the tests don't run right off the bat, then I would step back in version control to the point where you got the code, and see if they run there. If they do, then you know that something you did while upgrading to 5.2 was the culprit.

If (I hope this is not the case) there aren't any tests at all, then you need to write some before you start updating Rails. Otherwise you are as well off just trying to rewrite the app altogether in the new version of Rails. It's really not a one-step bundle update rails and everything just works. There are a lot of differences between what was current two or three years ago and the just-released Rails 5.2.

Walter