Treehouse VM versus install on my machine for ODOT and such
Just looking for some guidance here: I really like working alongside the videos as closely as a I can, so even though I've got Ruby, etc., all installed on my MacBook Pro, I'm likely going to be using the Treehouse VM to build ODOT.
However, I'm having a hard time wrapping my brain around where the code will live once I'm done. Will I be able to copy it to my own machine? Will I actually already have it? Should I just not use the VM?
With Workspaces and HTML, it's a moot point--easy copy and paste. But with this, less so. Thoughts? Opinions?
Thanks in advance!
Mike Hickman19,817 Points
I hope I'm understanding you correctly. The entire structure of ODOT lives locally on your machine if that's where you set it up. When you are starting your project you go to the folder you'd like your project to live, and then your "rails new ODOT" will create all the project files and folders for you in that location locally. If you already have ruby/rails installed, I'd say just do it all locally. I was able to follow along with the videos without any issues.
I have mine under C:\treehouse\projects\ODOT , so anytime I want to go back to the project and see/play with it, it's right there ready and available to me.
Just navigate to your ODOT project folder, start your local rails server after starting the project and your app is ready to interact with.
Another thing you could look into is pushing your ODOT project onto github so you know you'll have access to it wherever you are.
Hopefully this helped a bit. Have fun!
Maciej Czuchnowski36,437 Points
Like Mike said, if you use GitHub, you will always have access to your code. Even if you lose your project files from your computer for some reason.
The VM dedicated to this project will have everything installed in the proper versions and should work without hiccups, at least theoretically (I never tried their VM and Vagrant in general). I would probably just download the project files and look at the versions of gems in the gemfile.lock and make sure my project uses the exact same versions (especially Rails and RSpec gems). You might not be comfortable with doing that, so you can also download the project files from one of the first videos and use them as a starting point (before that make sure you understand what lead to the creation of the code you're looking at). This way you should have gemfile and gemfile.lock files in the project with the exact same versions as Jason uses in the videos, so when you run bundle install, the project should use the same stuff as in the videos from now on. That is the theory at least.
I'm just lucky you didn't say, "uh, just watch another minute of the video and all will become clear.":
I guess I don't quite understand what the VM is for if the files are locally stored. Is it just to level the playing field, and know that all students definitely have a development environment that works? In time perhaps that will become clear?
Andrew Stelmach12,564 Points
So where should I go if I want to build my OWN Ruby app? Because trying to use this tutorial info to build my own app with 4.1.6 is leading to errors.