Skip to content
Coding Fanatic
  • Android Development
  • News and Reviews
  • Road2Pro
  • Tutorials
  • Services
  • About

Sharing is Caring 3/100 Days of Code

  • May 3, 2018September 16, 2019
  • by Richard Clarke

If you’re going to be a programmer, you should have some background in IT.

I ran into another wall in the SQL Relational Databases course. I set up my virtual machine running Ubuntu so I could create databases and run SQL queries locally via Python. This is better than using the Udacity course page since it lets me work offline any time I want.

Everything installed without a hitch. But I couldn’t see my course work. Vagrant is supposed to allow me to sync local directories with the virtual machine. However, whenever I logged in, I couldn’t see the project files. I uninstalled and reinstalled Vagrant at least three times. I even went so far as to manually configure the shared folder directory in Virtualbox JUST to be sure it would work. No dice. But it did point me in the right direction.

When starting a virtual machine in the terminal, the shared folder settings in Virtualbox were reset back to C:/ or the root of my hard disk. Even though I manually changed it to the vagrant project folder, it kept resetting to the root directory. Furthermore, when starting the virtual machine in the terminal, I noticed some interesting output in command promptĀ 

I had a feeling something was telling the Virtualbox C:/ was my shared directory. And that something could be changed to follow my directions.

I opened the Vagrantfile Ruby file located in the parent directory of my project folders. Sure enough, this was the configuration file I needed.

There was a line containing code related to the synced folder that read:

config.vm.synced_folder “/”, “/vagrant”

It seemed the two fragments of code in quotes contained arguments for the sync folders. The second one obviously was the name of the folder. That meant the first one was the local directory I wanted to sync. Since it only contained a forward slash, I assumed it meant the root directory.

I updated it with the directory of my project files and saved my changes. After restarting the virtual machine and navigating to the /vagrant folder, sure enough, my local projects appeared!

It took a lot of experimenting and digging, but I have to admit, it was fun troubleshooting this issue. Now that my files are accessible, I’m ready to continue learning about Python and SQL!

Related

SNAKES RULE! 100 Days of Code, 2 of 100
Puns and Needles, 4/100 Days of Code
Richard Clarke
Richard is currently a developer using Java and Android Studio to build custom applications for Android. Richard tutored in mathematics at Montgomery College, and worked in Information Technology before entering the Software Development industry as a Quality Engineer.
100 code command days Information Technology IT of Programming prompt python Ruby terminal

Related articles

Your New Favorite Stopwatch App!…
Two for Two BABY! 7…
…But the App is for…
Play Store Blues – 5…
Top 4 Tips for Android…
No Dice – 3 of…

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Join the mailing list!

This field is required.

Check your inbox or spam folder to confirm your subscription.

Follow me on social media!

  • GitHub
  • YouTube
  • X
  • Instagram
  • LinkedIn
My Tweets

Join the mailing list!

This field is required.

Check your inbox or spam folder to confirm your subscription.

Follow me on social media!

  • X
  • GitHub
  • LinkedIn
  • YouTube

Archives

Theme by Colorlib Powered by WordPress