Tuesday, February 9, 2010

You are here: Home > Articles > Getting Set Up For The A-Z Intro to Rails Tutorial

Getting Set Up For The A-Z Intro to Rails Tutorial

by Robert Dempsey on April 22, 2009

UPDATE: Attend and you could win a prize!

In preparation for my Monday morning talk at RailsConf 09′ – – I need you to get your development machine ready to go. We don’t know what the Internet situation will be, and it can take a bit of time, so let’s get it set up now.

Base Installs

Mac

Robby Russell from Planet Argon has the definitive tutorial for installing Ruby on Rails and Postgres on Mac OS X. The tutorial will get you set up with XCode, MacPorts, Ruby, RubyGems, Rails, Mongrel, and finally Postgres. That’s everything you need to be ready to go.

Windows

The Rails wiki has an excellent tutorial on getting Ruby, RubyGems, and Ruby on Rails installed. You can use the tutorial to install MySQL if you like – it’ll work great for the tutorial – or you can go full bore and install Postgres using these directions. If you choose Postgres, definitely install pgAdmin as well.

What We’re Building

Time is short and there’s a lot to explain. So, we’ll be building a simple recruiting application, complete with employers, jobs, and candidates. We’ll try to do this w/out plugins and additional gems, so you should be ready to roll.

Bookmark and Share
  • Anna Shipunova
    I already have Ruby on Rails on my MAC and actually work with it, but iinstead of PostgreSQL it use MySql. Should I install PostgreSQL too?
  • Same question - I use MySQL rather than PostgreSQL. Since I'm very comfortable with MySQL, is there any sense in my installing PostgreSQL too?
  • Hi Anna and Justin,

    MySQL works perfectly here too. No need to install Postgres. You're ready to rock.

    Anything in particular you are looking to get out of the talk?
  • Hi Robert, by training I'm a Java developer and have 6 years of experience with that language. I've spent some time using (playing) with Ruby/Rails but my learning has been through exploration and, by that very nature, has some holes in it. I'm looking to get a wider view (rather than depth in any one topic) of Rails. Looking forward to it!
  • You are in luck then since that is the direction in which I was going. It's hard to get detailed within 3 hours, however I'm more than happy to work with you after the tutorial session.
  • Mark Monica
    Hi Robert,

    My background is that I'm a Windows VB.net guy (going back to VB5 and nearly 12 years programming experience with my company) and we are in the process of converting applications to Rails 2/3. I have been through the Simply Rails 2.0 book by Partick Lenz to date and am looking to ramp up to be able to build applications (most likely with MS SQL Server). Looking to build on the solid ground that the Simply Rails book has provided. Thanks for the heads up on the course and I look forward to a very productive week in Vegas.
  • @Mark: I look forward to meeting you sir. See you shortly.
  • If we wanted to use linux would using the standard repository install be sufficient?

    http://wiki.rubyonrails.org/getting-started/ins...
  • @ErikP: Yepper. Thanks for mentioning that too. As long as you have Rails, Ruby, and either MySQL or Postgres installed, you shoud be good to go. I'm going to try to keep the application to not needing anything outside of the standard stack.
  • Tony
    Hi Robert. I'm a C++ programmer with about 15 years experience; I've also done work in VB (4.0 16-bit, yikes!), a little with Delphi, and some straight C, as well as doing an embedded Linux system in C++. I'm currently working a 10-month contract that forced me to teach myself Rails and am in the process of completing that project. Although I've been able to figure enough out to get a viable app up and running, I'm afraid of what an experienced Rails programmer would say about the innards of this app.

    So, I'm looking to find out how to do it the right (easy) way, and looking forward to your presentation!
  • @Tony: thanks for letting me know where you stand. I'm hoping I can help you out a bit. I look forward to seeing you on Monday.
  • Paul
    I've been using Rails since 1.2.3 and just currently upgraded my company's internal app to 2.2.

    The main purpose of the app is to tie several internal and vendor provided db's together into a unified user experience. So far, everything is working beautifully.

    However, I'm not using routes and frankly don't understand how to use them (or even why). Also, I think I went waaay too far in my use of partials and now my back button is broken.

    I'm looking for the right way to get things set up and hoping that I will be able to figure out how to get myself out of the hole that I dug.

    A lot like Tony, I'm afraid of what a "real" Rails programmer would say about my code.
  • Hi Paul, I hope I can provide some info that will help you out. Come see me after as well if you're questions aren't answered.
  • Anna Shipunova
    Hi Robert,
    Thanks for answer and sorry for delay. I've read some books about Ruby on Rails and started work on it, so I learn on practice :-) But I think I want to systematize my knowledge for doing all right. For example how and what to move from my to big controller to model and so on. And like people above I'm afraid of opinion of “real” Rails programmer :-)
  • Hi Robert,
    During registration for the conference I signed up for another tutorial, but after reading this page I decided that I'd like to switch to yours. Would that be ok with you?. Of course I'm going to check with the staff at the conference as well.
    Thank you and looking forward to meeting you.
    Braulio.
  • @Anna: I will try not to disappoint. I'll be at the conference the entire time and I'm more than happy to help you. I won't be judgmental either. I'm afraid of what people might say about my original code.

    @Braulio: you don't need my permission to come on over. I look forward to your attendance, and hope that I can add some value for you as well.
  • jed
    @Robert, is there a way to just be sure the rails is all working fine? Ran the os x install just fine and I already had mySQL installed which is working. Should I be able to navigate to a localhost port to check on the mongrel server..? anything else to check before monday morning?
    thanks,
  • Hi Jed,

    If you have a project, go into the root directory and type "script/server" and then browse to localhost:3000. If everything is good then you should see the default Rails page. If you don't have a project, create a new Rails project, create the databases, then browse to the directory and fire up "script/server" and browse to localhost:3000. Let me know if that works for you.
  • jed
    just a heads up for anyone else that might run into this problem... I already had mySQL 5.05 installed and when I ran db:create I got a notification that the mysql gem was not installed (with rails 2.3) and to install it with "gem install mysql" which gave me an error that it failed to build the native extension. I was able to successfully install it by providing a parameter flagging the location of the mysql-config file:
    sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
  • Thanks for the help Jed. Installing the MySQL gem is, frankly, a PITA.
  • warren elliott
    Dang...due to the weather on the east coast, my flight is delayed out of Hartford, which means I will miss the connecting flight to Las Vegas tonight and miss your tutorial tomorrow morning.

    Would you post the tutorial code some place so I can walk through it? Thx.
  • @Warren: I posted my slides to Slideshare, and updated them with the feedback from the audience. I am working on a blog post now with the slides, links, and the final code for download as well. That'll be up in a few minutes.

    @mike: I don't think that Railsconf was recording the sessions, however if I can help you with anything during the conf find me (via Twitter or what have you) and I can work with you.
  • mike taus
    Robert, I'm in your session now and there's a lot of stuff being covered... Will you post a video of this session as well? I'd like to sit through this again.
blog comments powered by Disqus

Previous post:

Next post: