When you try to open the Gemfile in Atom, are you using the "Open File" or "Open Folder" option? Most of the time you'll want to use the "Open Folder" menu item to open the rails project folder. In your case it will be the
test_app folder. Once you open the folder, part of the Atom window will display all the files in the folder, including the Gemfile and you can click on it to edit.
If you just want to edit the Gemfile without opening the project folder, you can use the "Open File" menu item to open the Gemfile directly.