[STUDY GROUP] Learn Ruby on Rails Week 1

My apologies if I've been a little short on details. The format of this study group is going to be one posting per week made up of multiple chapters from Michael Hartl's [Ruby on Rails Tutorial: Learn Web Development with Rails](http://ruby.railstutorial.org/ruby-on-rails-tutorial-book) book. It doesn't take long to get through the chapters so I want to leave some wiggle room for how many chapters are posted each week in case we need to mix it up a little.

I'm doing a copy/paste and replace of /u/d0gsbody's post for Learn JS Properly.

**Administrative Stuff:**

This is a study group to follow Michael Hartl's excellent book [Ruby on Rails Tutorial: Learn Web Development with Rails](http://ruby.railstutorial.org/ruby-on-rails-tutorial-book). To the right of the book content is a little white box that says 4.0 and 3.2. Make sure that 4.0 is in red as that is the version we'll be following.

This group was announced in several different subs, but this sub /r/learnrubyonrails is where the sessions and content for the study group will be posted. (On a note, I haven't heard back from the mod of this sub and I'm not a mod here so I can't get information added to the sidebar. I have heard back from the mod for /r/learn_rails so I might move the study group over there next week.)

I will put up a weekly assignment every Monday for the next 5-6 weeks. Each chapter doesn't seem to take very long so we should be able to get through the book in 6 weeks easily. I'll be posting at least 2 chapters at a time.

There is an IRC chat at [#learnrubyonrails](http://webchat.freenode.net/?channels=learnrubyonrails) on Freenode. I plan to start averaging about an hour a day M-F hanging out in there (my access on weekends in somewhat limited but I can be on in the evenings for a bit). I encourage you to also.


Do Chapters 1 and 2 from the book. Chapter 4 touches on Ruby and Mr. Hartl suggests learning Rails first, then Ruby, then swinging back to Rails, so there won't be any assignments around doing the Ruby track at codecademy.com.
Make a least one comment in this thread about something you learned, found interesting, or didn't understand very well.

10 thoughts on “[STUDY GROUP] Learn Ruby on Rails Week 1”

  1. Thanks for putting this together, jwjody.

    I’ve completed Shaw’s Learn Ruby the Hard Way this Spring, and Chapters 1-3 of Hartl’s tutorial series in the past couple months. I’ve been away from it for a few weeks, so I’m really looking forward to reviewing what I’ve learned and then diving into the new stuff with this study group.

    If anyone has any questions about set-up for the first few chapters of the Rails tutorials and/or basic (and I mean *basic*) Ruby questions, I can try to help out.

  2. Chapter 1 was straight forward for me. I already had ruby, ruby gems, and git setup on my computer. I am still getting comfortable with the git commands. The Code School [Try Git](http://try.github.io) lessons helped me a lot in understanding git.

    There were some parts of Ch2 that had me confused, Scaffold being one of them. From my understanding the Scaffold command sets up the basic resources for certain part of your app and takes a couple of parameters. The parameters used in this chapter had to do with objects and their types. What other parameters can be used?

    Scaffold creates very basic resource files which you can then either create, read, update, or delete (CRUD).

    The other part that I found a bit confusing was the Rake command. I have some knowledge of the Linux make command. The Rake command brings together all the files into the database. In the chapter, its says

    > “We first need to migrate the database using Rake”

    Can someone please explain what this means and why this needs to be done after the Scaffold command.

    Excited to see where this study group goes!

  3. I learned that the setup process is definitely a big hurdle for beginners. Getting everything working perfectly can be frustrating. But everything is smooth sailing after that.

    I was originally working on Windows. However, after a lot of configuration problems in the advanced configuration chapter I switched to Linux (Ubuntu). I redid the work and I found that setup was a lot easier.

    I found later that it is pretty well known in the community that web development on windows is just not a good idea. Learning resources for beginners tend to be very forgiving when discussing this in order to not discourage students before they even begin. My advice for those on Windows would be to skip the advanced configuration chapters (Ch3.6). If a Gem keeps breaking after you have tried everything… is probably windows. If you have an old laptop lying around try installing ubuntu on it. It’s very easy and there are plenty of tutorials out there to get started.
    A wise Rubyist once told me “If you feel like you are fighting with Ruby, you are doing it wrong”.

  4. I think for the next session I’m going to double the amount of chapters. This first week seems to be really slow but I thought if there were people that needed to install everything on their machine that this would be a good time to get help for that and get the bugs worked out.

    Also Chapter 3 starts the app that we’ll be building for the rest of the book.

    So next week I’m going to bump this up to 4 chapters! 3, 4, 5, and 6! Hopefully that we’ll keep us busy!

  5. Will I be able to get by with a virtualbox of Ubuntu? I’ve never used a virtualbox, and I don’t really want to do a dual boot. Virtualbox is free right? I saw that it has a GNU license but I can’t download it at work.

  6. Thanks jwjordy for starting this.

    I use a windows machine with 2 VM’s one Ubuntu for R/R and one GITLAB machine ( so I am not spamming github with lots of useless things.)

    Using Webdrive I then mount the Ubuntu R/R with SFTP so that I can use any editor of choice (prefer sublime).

    I am about to wrap up “https://onemonthrails.com/” not sure I would recommend it if anyone is interested.

    If anyone has questions about the setup I have let me know, would be glad to help. I will update in a day or so with something interesting that I learned from the Hartl book’s first couple of chapters.

  7. I opted for Aptana Studio 3 as my IDE since it’s much easier to work with imo than what is recommended, at least for windows. Hopefully that doesn’t cause issues down the line.

  8. I have a couple of questions.

    We’re doing Rails v4 version of the book. If I wanted to use an older version of Rails and Ruby because I’m constrained by my host. Is all I have to do is install the version using RVM and declare the version in my gemfile?

    On a separate note, under what conditions does bundle install have to be done? I was going to try this tutorial using Foundation instead of Bootstrap. So I initially installed the Bootstrap gem, then changed that out and added the Foundation gem. Then decided to go back to Bootstrap.

    Since I had previously installed the bootstrap gem did I need to run bundle install again? If you remove a gem does it uninstall it from that app? Or just not use it?

  9. Hey, any suggestions for coming at this with a Windows machine? I’ve had a lot of trouble with basic configurations in past.. random things like “ctrl + c” not actually shutting down the server. It’s been painful just getting going.


Leave a Comment