Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Ubuntu Virtual Box Shared Folder Best Practice Question

I'm working on the Sass course right now. From what I understand, Windows isn't optimal to set up Ruby on.

What I've done is set up a Virtual Box machine running Ubuntu (my first time using Ubuntu)

I have everything configured, but I was annoyed at how Brackets text editor running within Ubuntu was not minimizing properly, and also not scaling properly to my monitor.

I created a Virtual Box shared folder to a folder on my Windows machine. I set Sass to monitor it, and then edit the files on Windows Brackets. I also have the live preview open on Windows and it works and looks a lot nicer.

Since I don't know a lot about Ubuntu/Linux yet I'm just wanting to make sure this is an acceptable practice that isn't highly prone to data loss. I haven't encountered any problems so far and it works wonderfully. I plan on backing up the shared files regularly.

Thanks

3 Answers

Nathan Williams
seal-mask
.a{fill-rule:evenodd;}techdegree
Nathan Williams
Python Web Development Techdegree Student 6,851 Points

To answer your question, you've basically recreated the Vagrant workflow, a highly regarded and popular way for developers to work :) I'd recommend switching over the rest of the way, since you're already most of the way there, and it should help make your setup more repeatable, and have a look through the docs and some blogs about developing with vagrant, there's lots of tips out there for getting the most out of it. Good luck!

Awesome, thanks for the response. I'll check it out right now!

+1 what Nathan said. Nice job on coming up with this solution!

Like Nathan said, Vagrant is an awesome tool that developers love. We use it here at Treehouse all the time!

Here's a link to a quick crash course: https://sysadmincasts.com/episodes/42-crash-course-on-vagrant-revised

Thanks, I'll check out that link too! I think I've gotten it almost up and running. I used https://blog.engineyard.com/2014/building-a-vagrant-box to help with the instructions of creating my own box file. I'm waiting for the VM to export right now. I'll have to learn about setting a custom SSH key, as using a universal one is not good practice I assume.

Thanks again to both of you for the help!

Edit: I see vagrant replaces the SSH key on startup. My machine is up and running, now I just need to figure out why SSH isn't working.

When I run sass --watch . over ssh, it will updated the changed in the synced folder, but any further changes I do are not recognized till I ctrl-c and run the command again. So it's syncing but not watching properly. With the version I had set up without Vagrant it worked perfectly, so I'm clearly still missing something in the sync settings.

Nathan Williams
seal-mask
.a{fill-rule:evenodd;}techdegree
Nathan Williams
Python Web Development Techdegree Student 6,851 Points

interesting. i can't say i do much with sass (i use vagrant more for sys-ops than dev), but a quick google search makes me think you might want to also use --poll? https://github.com/sass/sass/issues/504. g'luck!

Thanks the --poll seems to work. I checked on my original virtual machine and now --watch isn't working either. --watch was working on shared folders before on my non-vagrant VM. So I must have messed something up when I was preparing it for vagrant. I'll try and figure it out later what I messed up for my own learning, but for now your suggestion works fine!