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

Ruby ActiveRecord Basics Introduction to ActiveRecord A Quick and Dirty Example

Philip Bessa
Philip Bessa
5,396 Points

"rake db:create" and "subl ." didn't work. Can't follow along.

He's using a Mac, I'm using Windows. He has rails 4.0.3, I have 4.0.1. The previous courses he refers to are even further outdated so I don't know if that's the issue or not.

Basically, he ran rake db:create and when I did it, it shows no result and just shows the command line. If I run it again it does mention sqlite3 already exists.. does that mean it worked? He then runs subl . which only returns No command "subl ." found. That means I have to open Sublime Text manually, but there was no such configuration or ability to do that in the previous courses.

If I manually open Sublime and try to look for the hamblog folder to open... there is none found. Completely mystified at this point.

I'm just heading out but will try to get you something meaningful on this when I'm back home.

Philip Bessa
Philip Bessa
5,396 Points

Take your time, and thank you.

To be more precise, I use the Treehouse VM described here:

https://teamtreehouse.com/library/installing-a-ruby-development-environment/installing-a-ruby-development-environment/installing-the-treehouse-vm-on-windows

I had no trouble using it up until now, where it's like apples to oranges in following this course!

2 Answers

Hi Philip,

I've not got any experience of using the VM.

However, for a couple of your points. If rake db:create worked, you will have a schema in db/schema.rb I think. Does that file have a set of tables etc defined (or does it need a migrate to do that?! - It's been a while!).

Typing subl is something you can get a Windows machine to do - here's a link for that.

To do it manually, you do need to know where you put your Hamblog folder. You navigate the Open... dialog to that folder then open the whole folder - not what's inside it. That will give you the folder & file structure on the left that you can use. I've no idea why your folder should be invisible, though. Try a search as it may have put it somewhere odd!

Sorry that's not massively helpful - this sort of setup stuff can be so fiddly!

Steve.

Philip Bessa
Philip Bessa
5,396 Points

As far as I understand it, I can only see the files through the VM vagrant connection. They don't exist on my computer, and as such I can't open them with Sublime. In other words, even though I created them, searching for them on my computer will yield nothing.

I've followed the guide you linked but cannot get Sublime to launch from the command line. I'll keep trying though. Thank you.

Philip Bessa
Philip Bessa
5,396 Points

Okay, it does work... only in Windows command prompt. Going through the setup (Cmder.bat, Treehouse VM, etc.) given in this track, it isn't recognized. That sucks.

All seems very fiddly, yes. Glad you got it working, of sorts!

kabir k
PLUS
kabir k
Courses Plus Student 18,036 Points

I'm having the same issues with this video and I'm using Mac.

Also, do we have to use VM? He didn't say anything about using VM up to this point in the video. It's so frustrating and confusing.

Philip Bessa
Philip Bessa
5,396 Points

You shouldn't need to, since you have a Mac. I'm using a VM because I have Windows, this track instructs us to use it for rails environment. He's also using MySQL which is like double-jeopardy.

Not even Treehouse support responded so I'll probably just abandon this track. One month of progress = goodbye!

kabir k
kabir k
Courses Plus Student 18,036 Points

Thanks Phillip, some of this courses are hard to follow.