Slashdot Mirror


Apple Publishes Ruby On Rails Tutorial

bonch writes "Apple has noticed the high amount of Mac usage in the Ruby on Rails community and has posted an illustrated Ruby on Rails tutorial. The document goes into more concise detail in getting new users up to speed, from database schema to moving beyond scaffolding, all done with the favored Rails editor, Textmate."

21 of 228 comments (clear)

  1. Ruby Is Groovy by ObsessiveMathsFreak · · Score: 5, Funny

    Jobs: Ruby is groovy man. It's got like, vibe. We had to get in on that.

    Gates: C# with .NET offers more flexibility with less development worries and higher performance...

    Jobs: Man! Talk about Squaresville! Ruby is hip man! It's a love machine. A child of the earth.

    Torvalds: Ruby is based on perl, which is in turn based on bash scripting, which I like.

    Jobs: You see man! Ruby is a free spirit. It grows in like, the sunshine. It doesn't obey your rules!

    Gates: But it's just another paradigm. .NET can accomplish all the same....

    Jobs: On Rails man! Rails!!! It's like hyperspeed into the cosmos. And that's why its fit for Apple's attention. Now if you'll excuse me, I have to go get some podcasts over rss, browse some blogs, do some yoga. You dig?

    ***Jobs walk's away clicking fingers rhythmicly***

    Gates: But it's all just flash and hype. Nothing really new is going on! .NET does all this! Why won't anyone listen? You believe me right?

    Torvalds: Look man. I really just don't give a shit.

    --
    May the Maths Be with you!
    1. Re:Ruby Is Groovy by Anonymous Coward · · Score: 2, Insightful

      .NET's ORM system is nowhere near as complete or useful as the one in Rails... You're kidding yourself if you think otherwise (and yes, I have tried development in both systems and Rails beats .NET hands down)

    2. Re:Ruby Is Groovy by k2r · · Score: 2, Insightful

      > Ruby is a free spirit. It grows in like, the sunshine. It doesn't obey your rules!

      It's more like "Ruby doesn't get in your way!" as Rails dosn't do (most of the time) and OSX avoids to do quite successfully , too.

      Chunky. Bacon.
      k2r

    3. Re:Ruby Is Groovy by LarsWestergren · · Score: 2, Insightful

      Something like ruby is what apple needs to compete with .net.

      It is not like there is only room for a single programming language on a platform...

      Besides, Apple already uses Java, for instance it built the highly successful WebObjects around it. If, against all odds, .Net would completely wipe out Java there is always Mono.

      --

      Being bitter is drinking poison and hoping someone else will die

    4. Re:Ruby Is Groovy by saboola · · Score: 2, Funny

      Ballmer: (Throws a chair)

    5. Re:Ruby Is Groovy by Eric_Cartman_South_P · · Score: 2, Funny

      But have you ever seen Ruby on Rails... on weeeeeeed?

  2. Another great tutorial, but.... by MrByte420 · · Score: 3, Insightful

    The authors of rails books need to stop writing tutorials and write some comprehensive documentation. Even the page is quite lacking.

    For example, suppose you have a time field, not a date field, no year, just time. And you want to create that element in your webform.

    If it were date, you'd use date_select, pass it the name of the object and the name of the field, and your done, you get a nice input box. Suppose you want the same thing for time, its still date select with a series of discard attributes, e.g.

    date_select('meeting','starttime', :discard_year => true)

    However, you as the person looking for the documentation for this are led on somewhat of a goose chase becuase your time input box information is not even close to what you'd expect (time_select perhaps?) and you should be looking under "date" for "time".

    (Incidentally, Rails 1.0 has a bug where it seems to ignore :discard_year so the whole exercise is quite fustrating when you do find the docs, but i can live with bugs that will be fixed)

    --
    If religous zealots don't believe in Evolution, then why are they so worried about bird flu?
    1. Re:Another great tutorial, but.... by killjoe · · Score: 2, Funny

      I don't know what to tell you. I guess ROR isn't for you. Maybe try PHP, there is a lot of documentation there. I was going to say try zope but it's even harder and the documentation is even more outdated.

      I guess there is always java. Lost of documentation there if you want to spend all your time typing everything three times.... Customer myCustomer = new CustomerFactory.createCustomer("joe").asCustomer()

      Whatever you do stay away from perl though, that way lies madness.

      --
      evil is as evil does
  3. Re:Looks interesting by lennart78 · · Score: 2, Interesting

    I've been spending quite some time working on it on an OS from Redmont. I'd reckon the experience can be compared to that on any *NIX/BSD you prefer.

    The main things I have to say about tools is: I haven't found the right tool. Yet.

    The scintilla-based editor that comes with rails is ok, but no more than that. I'd prefer an IDE, with some project management and such. It seems like there are some possibilities with eclipse. http://www.napcs.com/howto/railsonwindows.html#_To c111133460

    But I still have to check that one out...

  4. Re:OS X Ruby doesn't work with Rails? by skribble · · Score: 3, Interesting
    So my question is: if Apple thinks Ruby on Rails is such hot shit, why doesn't they just upgrade their version to 1.8.4 via Software Update?

    Because it's probably not fully tested to work with Tiger. The only system updates you get with Software Update and bug fixes and security fixes. Occasionally you'll get something else which works behind the scenes with an updated iApp as well (there have been minor CoreImage and other framework pieces updated this way).

    This is just good sense, it's stability vs. cutting edge. Also it can be a very bad thing to update the system incrementally (Ask Microsoft who have been bitten by this many times... often updating one thing can have unexpected results on others.

    Also, for a developers interested in using Rails, updating Ruby is fairly trivial. I would also add that often even if Apple includes the latest version of something you may want to compile it yourself anyway (Apache, PHP. MySQL are good examples of things that people will often *upgrade* right out of the box).

    --
    --- Nothing To See Here ---
  5. Rails is OK, but exposes too much SQL by YetAnotherName · · Score: 2, Informative

    See also this screencast for a comparison of Ruby on Rails, Zope (Plone), TurboGears, and Django. Oh, and J2EE which fares ... rather poorly in my opinion.

    Warning: the screencast is 36 minutes long!

  6. Compared with Django, RoR doesn't cut it. by Qbertino · · Score: 2, Interesting

    Hey, Guys! Get with the programm. Ruby on Rails is so last-season.
    Django is where the musics at. And for good reasons too. It's more mature, easyer to use, faster in developement, less performance hungry, has a documentation that's up to date and has a grown up backend kit. It's only that they GPLd it last summer, that's why it hasn't gotten all the press yet.
    And this is not to start a flamewar. Compare them both and you'll see what I mean.
    The RoR and Django guys are good friends btw.

    --
    We suffer more in our imagination than in reality. - Seneca
  7. no Locomotive love? by cygnus · · Score: 2, Informative

    i'm kind of bummed that they didn't mention Locomotive, which really makes getting started with Rails very very easy. it seems like every Rails tutorial starts with "OK compile Ruby, install Gems, install Rails, install and configure MySQL, and 10 hours later, you can use this really simple framework!" when with Locomotive and SQLite3, you can basically just download one app, click two buttons, and start typing.

    --
    Just raise the taxes on crack.
  8. Re:Wish they'd spend this time patching bugs by 99BottlesOfBeerInMyF · · Score: 2, Insightful

    Umm, the guys who write Web development tutorials for Apple are probably not the same guys that code the OS and applications. This tutorial wasn't actually written by Apple, they are just distributing it. You know the guys in finance are still working on accounts and haven't stopped to try to fix bugs in code either. I've been annoyed by Apple's weird handling of metadata versus extensions since they announced it but you are way off base in complaining about this as if it had some relation to security issues.

  9. Re:Mac and Ruby history by finnif · · Score: 2, Interesting

    No - it is a killer app for getting mentions on Slashdot. Having a development system with the relative lack of performance of Ruby, and the very close tie-in to the database and schema of Rails is more of a website killer than an killer app, I am afraid to report.

    I'm with Decaff on this one. I drank the RoR kool-aid after one of the earlier posts to slashdot. The first few weeks was awesome. Then essentially what happened was I ended up trying to rip out every aspect of RoR until I was just left with Ruby... which had terrible performance.

    If you're going to go with RoR, make sure you take the long view. While everyone says "it scales, because it has FastCGI", I'd really like to hear more about extreme high volume sites that are using it. How's it going for them?

  10. Re:Looks interesting by kbob88 · · Score: 2, Insightful

    I use it extensively (every day) to develop large, internally-focused applications. Our production environment is Linux Debian, while our development environment is (ugh) Windows.

    We use Eclipse with the RDT plug-in for Ruby. It's quite nice. Not as great an IDE as IntelliJ IDEA, but pretty good. There's not much Ruby-specific functionality in Eclipse yet that I can see, but it's certainly better than a basic Windows editor.

    We also use PostgreSQL, which has been very nice, stable, and fast. We've never had any problems with it and ROR. We use phpPgAdmin to administer it on production and pgAdmin III to administer it on development, both of which are fairly good database browser/query tools.

    So far the experience has been great. More worrying than the tools is ActiveRecord, which has a lot of nice features, but a few really glaring holes.

  11. WebObjects by macserv · · Score: 2, Interesting

    I don't understand why someone would want to use Ruby on Rails on Mac OS X, when WebObjects comes with the developer tools, is an enterprise-class Java app server, and is way faster in both development and deployment (on Mac, Windows, Unix, or Linux) than anything else I've seen.

    It really is the best kept secret in the web app world. If you've not tried it, you might want to give it a shot.

  12. Re:OS X Ruby doesn't work with Rails? by killjoe · · Score: 2, Interesting

    I have been going to WWDC for three years now. Every year during the feedback sessions people always ask the same things.

    1) How come you hate webobjects developers so much.
    2) When are you going to get a decent package management tool or formally adopt darwinports.

    Every year the answers are the same.

    1) We don't really hate you guys, we really love you, we neglect webobjects on purpose.
    2) We are apple, neither darwinports nor pkgsrc, nor fink is good enough for us. One day we will write a really cool one just watch.

    It would be funny if it wasn't so sad.

    --
    evil is as evil does
  13. Re:Usual omission... by An+Onerous+Coward · · Score: 2, Insightful

    I'm in the middle of writing a fairly substantial website in Rails. The first iteration of the site, everyone could do everything to every bit of data. The second version? I added one line of code to the parent of my controllers:

    before_filter :authorized? :except => ['show', 'list', 'index']

    The authorized? function redirects users to the login page if they're not already logged in. So the result is, it's trivial to add validation code before every single action that makes changes to the database. If I want to add a function that validates that the person making changes is the person who owns the object being changed, that's one more function and one more line of code. I haven't done it, because it's supposed to be a collaboration tool where people are encouraged to edit each others' work.

    You can do similar things to the models, defining actions and checks that have to happen before a database entry can be changed.

    I'm really not seeing the point of your rant. If you want security on Rails, it's easy to go from zero security to total lockdown, then back off until the app is functional.

    --

    You want the truthiness? You can't handle the truthiness!

  14. Re:I'm trying to learn RoR, but I have some issues by killjoe · · Score: 2, Informative

    "* Migrations are "database agnostic""

    As long as your database is mysql. If it's anything else you have to take your chances. Postgres is supported pertty well, everybody else can go fuck themselves because it won't work at all.

    --
    evil is as evil does
  15. Hey, What about Catalyst by holy+zarquon's+singi · · Score: 2, Interesting

    Catalyst is the hot new Perl based Model-View-Controller framework. It's been out for about a year, it's production ready easy for any competent programmer to work with, and backed by massive collection of libraries on CPAN. It has a large friendly and active user community, which you can find via the website.

    Me, I'm using it for lots of things - my project of the moment is gluing in some of the tasty AI modules on CPAN into it for automatic classification.

    --
    "...we should just trust our president in every decision that he makes and we should just support that." B.Spears 2003