The Intro to Rails Screencast I Wish I Had
videos

The Intro to Rails Screencast I Wish I Had

Tutorial Details
  • Subject: Ruby on Rails
  • Difficulty: Beginner
  • Format: 40 Minute Screencast

Isn’t it funny how most “introduction to Ruby on Rails” screencasts are overly simplistic, and rely on generators like scaffolding? The teacher typically follows up the tutorial by stating that most Rails developer don’t use scaffolding generators. Well that’s not much help then! I’d like to give you the tutorial I wish I had. Along the way, we’ll also rely heavily on test-driven development to build a simple app.

Choose HD for the clearest picture.

Covered in this Screencast…

  • Create models and generators
  • Use test-driven development to plan and test an application’s features
  • Work with ActiveRecord
  • Autotest with Guard
  • Use Rspec and Capybara to simulate the user.
  • Create partials
  • Take advantage of Flash notices
  • …and plenty more

Conclusion

If you watched the entire screencast, I hope you enjoyed it! There’s certainly much more to cover, but we crammed a great deal into thirty minutes or so! What other tricks and techniques have you picked up, if you’re just digging into Rails?

Add Comment

Discussion 144 Comments

Comment Page 1 of 21 2
  1. Rich Holt says:

    Just what I was looking for. Thanks!

  2. Jeffrey Way says:
    Author

    I’m knee deep learning Rails as well, so definitely let me know if you have any advice, everyone. :)

    • Great video, Jeffrey! Thanks gain! I’d like to point out the “Rails 3 in Action” book – it’s been really great helping me get started with rails, and I highly recommend it to anyone else who’d like to get started.

  3. bc says:

    Great! Great! Great! Thank you! :)

  4. Felix says:

    OMG MAN JUST WHAT I NEEDEDD!!

  5. Ian says:

    I liked the webcast a lot, but I was wondering if you could elaborate on why rspec is used more than test unit? Also out of curiosity, is that theme for Sublime 2 compatible with Textmate?

    • sirfilip says:

      Nice presentation.
      There is a awesome plugin for vim by tim pope called vim-rails thats what i am using.
      Try it out you wont be sorry :) .

      • sirfilip says:

        The way you write changes the way you think.
        Although rspec does the same thing that TestUnit does when you are writing specs you are more focused on the requirment instead of implementation (which is planted in the back of your brain when you write unit tests using TestUnit).

  6. LastRose says:

    for those with windows who want to run rails, look at http://railsinstaller.org/

  7. Tony says:

    OMG – definitely NOT what I needed.
    Not for beginners

    • Jeffrey Way says:
      Author

      It depends on your skill level. If you’re really new to the command line, git, and the MVC pattern, you might steer clear of Rails for a while. There’s definitely some prerequisites before you can even get started digging into RoR.

      • Friday says:

        Great incite into Ruby on Rail

      • Jeff, dude, I am familiar with MVC and command line, but it was still a little difficult to me. Not that the topic is, I think it was more like an information overload to me because I’ve never really messed with Rails at all, and it seemed like you were talking/moving pretty fast. I would have liked this a lot more if it had started completely from scratch, Rails n00b style, slowed down a bit, and taught over a series instead of cramming a lot into one video.

      • Toby Osbourn says:

        @David Ferguson – With all due respect, is that not what the pause button is for? I think there were plenty of places in the video that you could pause, do a bit of reading around the subject then jump back in.

      • Jeffrey Way says:
        Author

        Yeah, it’s really not a complete Rails newb tutorial. It’s for people who have already gone through a beginner’s screencast or tutorial. There is so much to cover, so I had to move a bit more quickly than usual.

        If the Rails tuts we’ve been posting gain some traction, I’ll chart out a full series.

      • David Smith says:

        Great flyover of some basic RoR structures, tools and development flow! It’s really interesting how ‘made for web apps’ it seems compared to how ‘genericly useful’ most other common web dev languanges feel.

        The only constructive criticism I could proffer in reference to ‘information overload’ is that it felt like every pause between every sentence was edited out or severely truncated.

        I didn’t have difficulty following, but the lack of pauses -did- create a ‘rushed’ feel. Of course, there may have been submission guidelines and time limits that had to be adhered to, so take it for what it’s worth.

        In any event, keep up the great work and thanks for taking the time to put this together! I’ve been very curious about the technology and this pointed the way towards some new things to investigate. Very cool stuff and I’d say a great first look at RoR! Thanks again!

      • david g says:

        It’s really odd how people have gained an interest in Rails lately. I know a lot of people who have started to dig into it, including myself. I think some Rails tuts would be awesome! I’d definitely be on board.

  8. ibura says:

    jeff you are THE MAN. thank a lot.

  9. Ravindra says:

    Hey, Jeffrey tutorial was just awesome. It would be great if you can do some lengthy Premium/Marketplace Rails tutorials.

  10. Stan says:

    Really nice tut, i like all the process with the test, thanks to made it.

  11. Toby Osbourn says:

    Thanks a lot for this – one of the more informative screencasts I have watched.

    It was probably out of the scope of this tutorial but a lot of the steps near the end looked like they maybe could have been turned into functions to be called again? You know to tidy up the test file a bit.

    Would this generally be best practice or is the repetition better for clarity in your opinion?

  12. hipertracker says:

    @David, check out that one http://railsforzombies.org/. It’s for total newbies.

    • Jeffrey Way says:
      Author

      I loved Rails for Zombies, but don’t think it’s for newbs either. It’s essentially an ActiveRecord course. Fantastic — but it doesn’t teach the complete picture.

  13. Ivo Trompert says:

    Nice tutorial. Why don’t you use Cucumber for testing. I think it’s more user friendly.

  14. Nelson says:

    Hey Jeffrey, great tutorial! I would like to know your method for self study in regards to learning new languages. I’d love to know your method for “proper” learning.

  15. Ian Rock says:

    A bit over my head also as I’m just starting to learn Ruby / Rails, so I look forward to revisiting this in the future as I do like your tuts. :)
    Does anyone have any suggestions or opinions on a WAMP equivalent for Ruby / Rails – or is it a case of installing the individual parts. I’m open to switching OS.

    Thanks in advance!

  16. So much buzz around tdd/bdd approach, but i really dont see any benefits for myself. Writing tests which are often 2-3 times bigger, than code itself.

  17. Adem says:

    Hey Jeffrey, may I ask you for how long you are messing with Rails now? Just curious about how steep the learning curve is. :)

  18. rege says:

    Hi,

    Jeffrey I think this is one of your the best screencasts ;)

    I want more screencasts about rspec and TDD !!!

    Greetings

    When next one about Rails expecialy rspec :P ??

    • Jeffrey Way says:
      Author

      Thanks. I moved pretty fast — but needed to keep it under the +1 hours mark. Maybe I’ll arrange/commission “Rails from Scratch” and “RSpec from Scratch.”

  19. Ian Rock says:

    Jeffrey, I think the thing most needed is a guide on how to take a static web guy from html / css into the Ruby / Rails world.
    It’s a cinch in PHP. Some time ago I followed your tuts on In the Woods – Diving Into PHP. I got to the PHP includes, mysql blogging part and thought “Wow”, “this is useful stuff!”.

    It almost seems that folks need to learn another programming language and get their development area setup, before they even think about developing in Ruby / Rails and transferring the skills and concepts. Which is a shame because Ruby is such a “clean” language to learn from the start.

  20. Jaymie Jones says:

    Fantastic screencast Jeffrey! I didn’t think it was too fast. But it was great seeing a real world test driven development scenario which puts everything into context. Look forward to some more. Maybe some authentication next?

  21. Chris Abrams says:

    If you do authentication, I’d like to ask for Devise/Omniauth to be considered.

  22. Daniel Gottschalck says:

    Hi Jeffrey!

    Very good tutorial.

    All though you might want to switch out the for loop in your view, with the Rails style:
    @tasks.each do |task| ? :)

    Regards

    • Jeffrey Way says:
      Author

      Why? The for-in style works fine there. :)

      • Daniel Gottschalck says:

        Why?

        Because why use a Ruby loop in a Rails view file? :)

        There is a very small difference in those 2 loop-approaches.

        But why do it that way when every other Ruby on Rails book does the “@stuff.each do |stuff| way? :)

        It sure well works fine, but it can be confusing for some, when they normally see the other approach.

        The “@stuff.each do |stuff|” is also generated by the scaffold engine.

      • Jeffrey Way says:
        Author

        I’ve seen plenty of Rails developers use simple for-in loops in a view. Don’t think it makes too much difference either way.

  23. Justin Christensen says:

    Hey Jeff :)

    Thank you very much for the screen cast. This fits perfectly with the speed and way I like to learn!

    I rarely post but I’ve been reading NETTUTS for quite some time now and I really appreciate the time and effort you guys put into providing quality stuff like this.

    Thanks again!

  24. Stuart Clove says:

    I cannot describe in words how phenomenal this was. I have looked at many books and screencasts for Rails and this is by far the best intro I have ever seen. I really hope to see more videos on Rails from you in the future. Bless you forever.

  25. Stuart Clove says:

    Sorry for the double comment and the noobish unrelated question but could you tell me what theme you are using for Sublime and where you got it? It looks glorious. Thanks man.

  26. PhillipKregg says:

    A tip for Windows 7 developers: if you are having issues running ‘rails g’ after bundling your gems, include gem ‘win32console’ in your gemfile. You may also need to set the ‘turn’ gem to a specific version: gem ‘turn’, ‘< 0.8.3'. The most recent version requires the minitest gem as a dependency and my Windows system didn't like that.

  27. sirfilip says:

    Nice presentation.
    There is a awesome plugin for vim by tim pope called vim-rails thats what i am using.
    Try it out you wont be sorry :) .

    Sorry about this i mess it up a little. Forgot that i was suppose to reply on the question Why Rspec instead TestUnit.

  28. amul patel says:

    Wow, I been learning rails off and on for a couple of years.. and I can say the TDD is such a pain in the ass for newbies. Getting something up and going and having FUN – is so important. Then TDD comes in and kills the buzz.

    Your screencast is so far the best presentation I seen that I could actually SIT THROUGH.
    Please keep em coming.

    - enhancing rails apps with jquery would be really cool.
    - social authentication (facebook, twitter)

    Amul

  29. Rory says:

    Jeff basically taught me PHP and jQuery.

    Looking forward to this, any download links?

  30. Paul says:

    Jeffery,

    Nice tut, just a quick question regarding setup? which version of rails are you using?

    I only ask as with rails 3.1 when I try the ‘find(‘#task_#{@task.id}’ in the delete post test I get an error which is ‘Nokogiri::CSS::SyntaxError’. Any thoughts on this?

    • Dennis says:

      Hi Paul,

      if you or others are still looking for an answer on this one. Replacing the single quotes with double quotes like this (“#task_#{@task.id}”) should do the trick. If you watch close enough you can see that this error also appears in the video. The fix may have gotten lost in post edit.

      Have a nice day, Dennis

  31. James says:

    I’m gonna need to watch this a few more times. That said, this tutorial just blew my mind!

  32. gavin says:

    This rocks…sincerely.

  33. blazeeboy says:

    i nearly got a mental damage due to your speed at coding, nice tutorial but please next time make it slower

  34. niyazi says:

    hello from Turkey
    we couldn’t see your video. becouse of regulations of internet here. but i couldn’t understand that this is your original website and you put this video yourself. why our authorities blocked this ? , it is stupid . can you give us another link for this video ?

  35. Japh says:

    This video was brilliant, Jeffrey!

    I’m just getting into Ruby on Rails myself, and really wanting to use TDD too. I found that I could totally follow along with your pace, and it was great to see TDD in action in a real-world scenario to get a grip on how to approach it myself.

    Thanks again! :)

  36. Glenn says:

    -bash: guard: command not found

    But guard (0.8.4) and guard-rspec (0.5.0) are in use!

  37. Tom says:

    Nice tutorial.

    Another great tutorial for rails taking you from beginning to a fully functional application is: Michael Hartl’ “Ruby on Rails Tutorial. You have to pay but it is worth it.

    Anyone have any ideas or know of a tutorial that explains how to use postgresql with rails.

    Thanks.

    Tom.

    • Just create the project with:

      rails new tasks -d postgresql -T

      Do not forget to change the user and password in database.yaml to conform to your postgresql settings, as by default rails puts for user the name of the project.

      As for installing postgresql server, see on the postgresql site, it is explained for various systems.

  38. David says:

    Thanks for making a real world screencast that pulls it altogether.

    Also, thanks moving at a good a speed and packing that vid full of info instead of fluff. This was definitely one of the few screencasts that actually conveys information more efficiently than just reading plain text.

    +1

  39. Giedrius says:

    Nice screencast. Learned some stuff about capybara! :)

  40. Oscar says:

    “UNREGISTERED”… Shame on you XD (just kidding, same here :P )

    This is an awesome introduction to real Rails development. I do really like TDD, GIT and those tools and patterns you showed.

    I can’t imagine a real project without them. Keep the good work!!

  41. Rory says:

    Hey, anyone else getting a “sorry, we are unable to play this video” message.

  42. Tharnid says:

    Great tut Jeffrey!!! I am having weird issues with Rails 3.1.x for some reason. I was just getting the hang off 3.0.x. I will say that I had to run:

    touch guardfile

    before I was able to run guard init rspec. I agree that a couple of testing screencasts would be nice :-)

  43. Jimmy says:

    Great tutorial!

    I follow the railstutorial.org which I assume you’ve done as well.
    I manage to get db working as in your example, but now with an app without a current db I get the “we’re sorry” on all pages.

    Any ideas?

  44. Ollie Read says:

    Hi Guys,

    As it stands, I’m only just under 5 minutes into this video but I encountered two issues I’m going to share for any other newcomers.

    Firstly, I updated my OS X Ruby installing moments before starting this tutorial, and unfortunately the gem turn was updated the day this tutorial was released, so if like me you installed after the 10th, you’ll have turn 0.8.3 which unfortunately has an undeclared dependency for MiniTest which causes issues because of the -T directive. To remedy this I simply changed the line to “gem ‘turn’,'<0.8.3'" which fixed the issues.

    My second issue was with guard, for some reason "guard init tasks" wouldn't create the guard file, had I known what guard did, I'd have used touch, but instead I ran "guard init" before hand.

    Hope this helps others.

  45. MaerF0x0 says:

    I get an error with `guard init rspec`

    [user]@[machine]:~/railsApps/tasks$ guard init rspec
    ~/.rvm/gems/ruby-1.9.3-rc1/gems/guard-0.8.7/lib/guard/guard.rb:62:in `read’: No such file or directory – Guardfile (Errno::ENOENT)
    from ~/.rvm/gems/ruby-1.9.3-rc1/gems/guard-0.8.7/lib/guard/guard.rb:62:in `init’
    from ~/.rvm/gems/ruby-1.9.3-rc1/gems/guard-0.8.7/lib/guard.rb:34:in `initialize_template’
    from ~/.rvm/gems/ruby-1.9.3-rc1/gems/guard-0.8.7/lib/guard/cli.rb:103:in `init’
    from ~/.rvm/gems/ruby-1.9.3-rc1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run’
    from ~/.rvm/gems/ruby-1.9.3-rc1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task’
    from ~/.rvm/gems/ruby-1.9.3-rc1/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch’
    from ~/.rvm/gems/ruby-1.9.3-rc1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start’
    from ~/.rvm/gems/ruby-1.9.3-rc1/gems/guard-0.8.7/bin/guard:6:in `’
    from ~/.rvm/gems/ruby-1.9.3-rc1/bin/guard:19:in `load’
    from ~/.rvm/gems/ruby-1.9.3-rc1/bin/guard:19:in `’

  46. zaw says:

    WOW That was perfect example of showing what exactly I need to learn!

    As for php dev they would complain about new syntax and command line, I don’t mind that if you get on to some practices, you will get use to it.

    Definitely want to learn more RnR from nettuts, please Jeff. and thanks :)

  47. Pjero says:

    Great approach. Finally something new, not just a copy paste of the blog in 30 minutes tutorial.

  48. Steve says:

    anyone else having this issue?

    Guard::RSpec is running, with RSpec 2!
    Running all specs
    /usr/local/lib/ruby/gems/1.9.1/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_
    /usr/local/lib/ruby/1.9.1/test/unit/testcase.rb:9:in `’: uninitialized constant Test::Unit::TestCase::Assertions (NameError)

  49. amazing! thanks a lot

Comment Page 1 of 21 2

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.