Configuring gemfile in vscode


I am unable to find gemfile in order to alter the configuration in Step 4.5.1 when i open the VS Code. Has anyone been able to resolve this? Please help!


What OS are you using @Ehbee?


Windows …so the using ubuntu with the windows subsystem for linux


Have you tried a computer restart to ensure your path is updated?


Just had a quick look at some other possibilities. One other possible reason is that the folder you created for your projects has been placed in the linux directories rather than on the c mount which should actually be windows files.

Where did you create the Projects directory you are using?


I created them on Linux so don’t know how to find them from c drive. Basically have no idea on how to navigate to where I stored it.


What do you suggest? Do I have to go back and recreate the files on my c drive to continue?


The project folder must reside outside of the linux files otherwise windows programs such as VSCode can’t do anything with them. That is why you need to create a symbolic link in the prerequisites section of the installation guide so your Projects folder is actually found in your user folder on windows.

If you go here and click the drop down box for wsl, make sure you do the section about creating a symbolic link and then create the rails app in that project folder you should be ok to run code . in that folder and have vs code open in the right place.


Thanks so much for your help.


@Ehbee I’m having this same issue. Did creating the symbolic link work for you?


Yes creating a symbolic link did work for me. I just issued the command and it was created. Just make sure you have the project folder created on the windows side of things you are issuing the symbolic link command on the Linux side.


I am using Mac therefore I skipped the symbolic link command and now I can not open Gemfile in VScode. I feel like I am stuck here. What do you guys suggest that I do



If the issue is that you can’t use code in the terminal to open the files then please read the section here on launching from the command line


I did that and it is not working. My VScode is currently open. I am kinda confused as to what I am suppose to put into the terminal with "Then we will use VSCode to modify our Gemfile. Open your app in VSCode by typing code . (THE . IS IMPORTANT) (WSL users: If you type code . and you see system32 in the top left, you have created your application outside of the Projects directory we created earlier.)

When VSCode opens you should see a list of files on the left side of the screen. Click to open Gemfile then"

from Step 4.5.1: Configuring the Gemfile


If you are in the terminal and the terminal is in the rails app directory you created then you should be able to type code . in the terminal and it should open VS code with the rails app directory showing in the folder structure on the left and you would then be able to open the Gemfile to edit it.


Thank you


I’m running into this same issue. I’m using Mac OS Version 10.13.6. Everything went smoothly until this point.

I’m in the terminal, in the ‘my_first_rails_app’ directory, and I see Gemfile listed within the directory. When I type ‘code .’ I get the following error:

-bash: code.: command not found

Any tips for opening my rails app in VSCode?

Thank you!


Did you run the command to add code to the shell path? It’s in a link in one of my posts above.


Thank you so much for the help with this!!!


I am using vbox 6.1 virtual machine running Xubuntu 18.04.3 and hosted on windows 10. I dont see the app files in vscode when i run code command in the xubuntu terminal.

vanheaven@vanheaven-VirtualBox:~/odin_on_rails/my_first_rails_app$ ls
app bin config db Gemfile Gemfile.lock lib log package.json public Rakefile storage test tmp vendor
vanheaven@vanheaven-VirtualBox:~/odin_on_rails/my_first_rails_app$ code
vanheaven@vanheaven-VirtualBox:~/odin_on_rails/my_first_rails_app$ ruby -v
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]
vanheaven@vanheaven-VirtualBox:~/odin_on_rails/my_first_rails_app$ rails -v
vanheaven@vanheaven-VirtualBox:~/odin_on_rails/my_first_rails_app$ hekoru version
hekoru: command not found
vanheaven@vanheaven-VirtualBox:~/odin_on_rails/my_first_rails_app$ heroku version
heroku/7.35.1 linux-x64 node-v12.13.0

After running code command, I get the welcome window in vscode but not the app files…Kindly assist