Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Apple Publishes Ruby On Rails Tutorial

Posted by ScuttleMonkey on Tue Feb 28, 2006 06:22 AM
from the big-pictures-that-ever-your-manager-can-understand dept.
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."

Related Stories

[+] Ruby on Rails 1.0 Released 332 comments
Simon (S2) writes "Ruby on Rails 1.0 has been released. From the announcement: 'Rails 1.0 is mostly about making all the work we've been doing solid. So it's not packed with new features over 0.14.x, but has spit, polish, and long nights applied to iron out kinks and ensure that it works mostly right, most of the time, for most of the people.' " The Ruby on Rails website has also been given a new look.
This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • nice (Score:1)

    by jlebrech (810586) on Tuesday February 28 2006, @06:32AM (#14815494)
    (http://i.nt.ro/)
    seems like a nice tutorial, even for non-os x users. I'll have to bookmark it on my site.
    • Re:nice by a name no one though (Score:1) Thursday March 02 2006, @07:26PM
    • 1 reply beneath your current threshold.
  • 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.
  • Now is the time... (Score:2)

    by bogaboga (793279) on Tuesday February 28 2006, @06:50AM (#14815547)
    ...to delve into Ruby. I was kind of tired of trying other tutorials (mainly from the internet) as I fouind them incomplete and sincerely wanting. Thanks to slashdot for the link.
  • It's nice to have a free tutorial, but Amazon reports that O'Reilly is releasing something called Ruby on Rails: Up and Running [amazon.com] in May. This will be good for those among us who have become addicted to O'Reilly's efficient guides.
  • Baskin Robins (Score:2, Funny)

    by Mr. Underbridge (666784) on Tuesday February 28 2006, @06:59AM (#14815573)
    Hey, I hear Baskin Robins is coming out with a new ice cream this month, "Ruby."

    This month only though, flavor of the month. Next month they're doing AJAX.

  • by Larthallor (623891) on Tuesday February 28 2006, @07:09AM (#14815599)
    According to Apple's article:
    The version of Ruby that ships on Mac OS X Tiger is 1.8.2, but it doesn't work well with Rails. So you'll need to upgrade your Ruby installation as well as install a newer version of Rails (as of this writing, use version 1.8.4).
    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?
  • Looks interesting (Score:1)

    by ROOK*CA (703602) on Tuesday February 28 2006, @07:32AM (#14815652)
    Haven't really had an opportunity to look much at either Ruby or RoR, this tutorial looks interesting, anyone out that works with RoR got any opinions on the availability/quality of tools and how it lives on other OS platforms...say Linux or FreeBSD?

    How does it stack up against Java for ease of development and/or performance/flexibility?
  • Another great tutorial, but.... (Score:4, Insightful)

    by MrByte420 (554317) * on Tuesday February 28 2006, @07:35AM (#14815666)
    (Last Journal: Sunday May 15 2005, @08:03PM)
    The authors of rails books need to stop writing tutorials and write some comprehensive documentation. Even the page is quite lacking. [rubyonrails.org]

    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)
  • It's good day (Score:1)

    by pepicek (710120) on Tuesday February 28 2006, @07:38AM (#14815672)
    I, for one, welcome our new overlords on Ruby on Rails on Mac OS X (roromoxes?).

    Especialy when I hope to be one of them :D.

    In what (will be) new in rails 1.1 [scottraymond.net], you will find more interesting stuff about that beautiful framework and its future. Worth reading if you are flirting with RoR.
  • Usual omission... (Score:1, Insightful)

    by Anonymous Coward on Tuesday February 28 2006, @07:39AM (#14815677)
    "In version 2 of my generic Ruby On Rails tutorial, I'll show you how to add some security to your site, so that not everyone can delete your todos/add expenses/edit your photos".

      Nooo! You've got to get security right from the start! Start with minimal privilege and add only that that is required. Otherwise you'll end up with an unholy holey mess.

      If your web-based framework lets you write something that lets you modify anything on the server without either logging in or explicitly telling the code its okay, then choose another framework ASAP.

      Yes you can add-on security to RoR, but it'll always be an add-on...
  • from the Rails weblog

    The Apple Developer Connection doesn't supply any attribution for their articles, but this one was written by none other than Mike Clark [clarkware.com], who along with Dave Thomas [pragprog.com] runs the always-sold-out Pragmatic Studio [pragmaticstudio.com] series of Ruby on Rails and Ajax training.

  • As noted on the Ruby on Rails weblog, the author is Mike Clark, who is fairly involved in the Rails community. He's not an Apple employee though. The ADC article just doesn't have his name on it, so it mistakenly seems like this tutorial came from within Apple.
  • by ursabear (818651) on Tuesday February 28 2006, @08:12AM (#14815827)
    (http://jimmybearpearson.com/ | Last Journal: Thursday November 09 2006, @10:10AM)
    The tutorial is concise and clean - a must for folks like me that don't have tons of time... I appreciate the post to ./ about this... my son has been asking about Ruby, and neither he nor I have had time to do anything with it at this point.

    I agree that the article should be attributed. It's important to give credit where credit is due. It's also interesting that the article mentions http://macromates.com/ [slashdot.org]">TextMate. TextMate is a nice concept.

    Simple tutorials like this are critical to the adoption of many technologies - but it would be nice to see better documentation about the everyday use of Ruby and ROR {nudge, nudge}.

    To pre-empt nuclear (or as the prez sez: new-queue-lurr) return strikes, let me say this: Tools like Ruby can be a real treat. I love the use of many languages (Java, Smalltalk, ObjC, etc.), but other, more lightweight tools make things come together in a big way for lots of jobs - use the tool and/or environment that works best, and do your best to work your craft the best way you can. It isn't about platforms or languages - its about design, solving problems for the users, and maybe getting to make a living along the way.
  • by ch424 (888921) on Tuesday February 28 2006, @08:26AM (#14815894)
    How many web hosts offer Ruby? In fact, how many web hosts run OSX? I can see this working on your own computer, for things like their example in the tutorial, and maybe for an app within a corporation but on the web there doesn't seem to be a feasible application for it. There's more truth than you think in ObsessiveMathsFreak's funny post. ch424
  • I've recently started playing with RoR, and though my first choice platform for any programming project is usually Linux, I went with OS X instead.

    Unlike Linux-Apache-Mysql-Php/Perl/Python which has the nice acronym LAMP. Linux-Apache-Mysql-Ruby has the rather unfortunate acronym LAMR (pronouced lamer).

    I'll stick with developing RoR on OS X.

    If you're interested in my lates RoR project, check out: OSWiki [sourceforge.net]
  • by suzerain (245705) on Tuesday February 28 2006, @08:46AM (#14815994)
    (http://www.gravitycollapse.com/)
    Hey Ruby/Rails users...giving you a chance to evangelize. I've never used it, but to me, it almost seems like a framework designed to make quick demos, but every demo I have seen is completely lacking in any design or uniqueness.

    So, my question is this: how easy is it if you want to have a more complex visual layout? What If I want a form to submit to an encrypted text file? What if I need to work this system into a very intricate design?

    What I'm trying to get at is: does its simplicity w/r/t getting something quick and dirty together mean it's a pain in the ass when you want to do something very special with it? Or is it equally easy to completely customize and change?
  • Rails is OK, but exposes too much SQL (Score:3, Informative)

    by YetAnotherName (168064) on Tuesday February 28 2006, @08:46AM (#14815997)
    (http://seankelly.biz/)

    See also this screencast [nasa.gov] 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!

  • The right tool? (Score:2)

    by ErikZ (55491) on Tuesday February 28 2006, @08:53AM (#14816032)
    This may be a dumb question but...

    Everything I'm seeing about Ruby on Rails says it's great for making "Web Applications". I'm going to start designing a new dynamic website soon, and I was wondering about building it using RoR.

    I just want to use CSS, and plug the whole thing into a database.

    So are they just buzzwording me, or is RoR the wrong tool to use for something like this?
  • by jocknerd (29758) on Tuesday February 28 2006, @08:54AM (#14816041)
    I'm going gung ho into RoR. I've bought the book from the Pragmatic Studio. I've bought TextMate. But I continue to hit a dead end. And its not getting away from scaffolding. No it comes down to an admin interface. RoR needs one desperately. And now. Django has one built in. Every tutorial on Rails is basically a one table tutorial with an occasional lookup table thrown in. Please somebody point me to a comprehensive step by step tutorial that details the creation of an administrative side of a web application.

    And I'm not impressed with Apple's tutorial. Why use the migration? I prefer to create my tables with good ol' SQL saved to a text file. Store it in the db subdirectory of your Rails app. Then import it into your favorite database (plug for PostgreSQL).
  • by Qbertino (265505) on Tuesday February 28 2006, @08:57AM (#14816056)
    Hey, Guys! Get with the programm. Ruby on Rails is so last-season.
    Django [djangoproject.com] 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.
  • by el_womble (779715) on Tuesday February 28 2006, @09:46AM (#14816391)
    (http://marshonsmacs.blogspot.com/)
    I hope they've told this guy [onlamp.com] about this new article.
  • by GekkePrutser (548776) on Tuesday February 28 2006, @09:59AM (#14816486)
    Great!

    However, I wish they'd spend some more time fixing important security holes in their OS rather than writing articles. We still don't have a patch for this Extremely Critical vulnerability http://secunia.com/advisories/18963 [secunia.com]. And it's been a week now.

    I'd rather have a secure OS running on my powerbook than a tutorial on some programming language I've never heard of before :) And yes, I am a programmer myself. But if I wanted to program in Ruby I'd probably have found a tutorial somewhere already.

    P.S.: This is not intended as a flame, just as a question where Apple's priorities lie.

  • no Locomotive love? (Score:3, Informative)

    by cygnus (17101) on Tuesday February 28 2006, @11:45AM (#14817525)
    (http://slashdot.org/)
    i'm kind of bummed that they didn't mention Locomotive [raaum.org], 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.
    • mod parent up by adpowers (Score:2) Tuesday February 28 2006, @01:49PM
  • Python? (Score:1, Interesting)

    by Anonymous Coward on Tuesday February 28 2006, @12:36PM (#14818102)
    But google uses python. Whats wrong? Python is dying because of its boring board of directors? Missed the train?
  • WebObjects (Score:3, Interesting)

    by macserv (701681) on Tuesday February 28 2006, @02:40PM (#14819618)
    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.
    • Re:WebObjects by ltmon (Score:1) Tuesday February 28 2006, @11:20PM
    • Re:WebObjects by simoncoles (Score:1) Wednesday March 01 2006, @05:04AM
    • 1 reply beneath your current threshold.
  • Catalyst [perl.org] 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 [cpan.org]. 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.

  • mysql wide open? (Score:2)

    by J. Random Luser (824671) on Tuesday February 28 2006, @06:18PM (#14822182)
    My first glance thru the tutorial saw mysql being run with the default root acct, no password :-( And last time I looked it was necessary to start mysql with a directive to listen localhost only, otherwise port 3306 is open to the world. Apple's (in)famous secure systems again...
  • Re:So.. (Score:2)

    by akheron01 (637033) on Tuesday February 28 2006, @07:05AM (#14815592)
    (http://www.berkshirephotonics.com/)
    That was Lufia 2! Although in the original Lufia you needed to find a Ruby to get through the three towers puzzle.
    [ Parent ]
    • Re:So.. by akheron01 (Score:2) Tuesday February 28 2006, @08:53AM
      • 1 reply beneath your current threshold.
    • 1 reply beneath your current threshold.
  • Re:Figures (Score:2)

    by Decaff (42676) on Tuesday February 28 2006, @07:08AM (#14815597)
    very annoying to users yet the darling of developers?

    Only those developers who can't see that a tight coupling between your code and your database is not a good idea.
    [ Parent ]
    • Re:Figures by Decaff (Score:2) Tuesday February 28 2006, @10:36AM
      • Re:Figures by unDees (Score:1) Tuesday February 28 2006, @06:09PM
        • Re:Figures by Decaff (Score:2) Wednesday March 01 2006, @07:03AM
      • Re:Figures by gigahawk (Score:1) Wednesday March 01 2006, @03:43AM
    • Re:Figures by An Onerous Coward (Score:2) Tuesday February 28 2006, @03:16PM
    • 1 reply beneath your current threshold.
  • Re:anagram (Score:1)

    by Jerom (96338) on Tuesday February 28 2006, @08:58AM (#14816058)
    no it is not.
    [ Parent ]
  • by oni (41625) on Tuesday February 28 2006, @10:25AM (#14816717)
    (http://slashdot.org/)
    What can it do that PHP or Perl/Mason can't?

    Well for one thing, they are designing it from the ground up to be safer than PHP. I actually do like PHP but damn, it's so easy to shoot yourself in the foot! I think I'm a good programmer. I constantly think about things like SQL injection. I read all the PHP documentation about the mail() function, but sure enough, I opened myself up to being a spam relay. I don't know if I was hit, but I had code out there that was vulnerable.

    But I followed the docs!!
    [ Parent ]
  • by Decaff (42676) on Tuesday February 28 2006, @10:33AM (#14816792)
    And now with Ruby-On-Rails being a killerapp for forward looking web designers

    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.
    [ Parent ]
  • 7 replies beneath your current threshold.