You are currently viewing Ubuntu Rails VM Tutorial: Troubleshooting

Ubuntu Rails VM Tutorial: Troubleshooting

Part 5 of 5 of the Ubuntu Rails VM Tutorial series

Tips to Help You Troubleshoot Your VM

  1. Have you checked the log from the beginning of “vagrant up”? Did all tasks execute?
  2. Does your vagrantfile correctly assign permissions for the folder shared between your machine and the vm?
  3. Sometimes apt updates fails because the server isn’t responding at that moment
  4. Is your file in the correct subdirectory?
  5. Is your shell or command not executing as expected? 
  6. It may be because Ansible doesn’t call bash but rather sh and does it non-interactively — meaning what your bash dotfiles do, doesn’t happen, including setting of the PATH environment variable
  7. Did you accidentally name a results variable the same as a results variable in a previous task?
  8. What’s appropriate for the task? Root or [username]? What is the task using?
  9. If you’re stuck, try the debug Ansible module
  10. If you’re stuck at the beginning, try commenting out successive playbooks and just get the first one working, then first and second, and so forth.
  11. Be careful of quotes and Ansible variables — use “{{ variable_name }}” in your Ansible statements for best practices (see YAML Syntax).
  12. Are your indentations spaces, not tabs, in your editor?
  13. Although the three dashes at the beginning of the yaml file are optional for Ansible, they’ll help editors recognize the file as a yaml. Did you accidentally whack them?

CR Johnson

As a software engineer with over a decade of experience working for Fortune 50 companies developing software for Windows, the web, and a few interplanetary spacecraft, she's programmed in a plethora of languages including the C#/ASP.NET stack and, recently, Rails. She has tweaked more CSS files than she can count and geeks out a little on data and SQL databases. In her spare time she works on her first novel and enjoys bicycling and dark chocolate.