Apple Publishes Ruby On Rails Tutorial 228
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."
Ruby Is Groovy (Score:5, Funny)
Gates: C# with
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.
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!
Torvalds: Look man. I really just don't give a shit.
Re:Ruby Is Groovy (Score:2, Insightful)
Re:Ruby Is Groovy (Score:2)
Re:Ruby Is Groovy (Score:2)
Re:Ruby Is Groovy (Score:3, Insightful)
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
Re:Ruby Is Groovy (Score:2)
Ruby is fantastic. Rails will probably be fantastic in about two years. Right now it's an immature product that gets in your way constantly, if you do anything seriously involved in it. Rails error messages range from "moderately unhelpful" to "holy shit obscure".
It seems that premature rails hype is leading to coders looking at it, and deciding that ruby is a shitty, inflexible, immature language, when they're blaming the wrong thing.
Re:Ruby Is Groovy (Score:2, Funny)
Re:Ruby Is Groovy (Score:2)
Re:Ruby Is Groovy (Score:3, Funny)
Re:Ruby Is Groovy (Score:2)
Re:Ruby Is Groovy (Score:3, Insightful)
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 [apple.com] around it. If, against all odds,
Re:Ruby Is Groovy (Score:2)
However your point still stands, there are many frameworks to choose from on both platforms, there doesn't have to be One True Way, in fact, it's harmful to think that way.
Re:Ruby Is Groovy (Score:2)
If they made the rule system more useful everything else would pale in comparison.
If Apple know what to do with webobjects rails (or even zope) would have never been invented.
Re:Ruby Is Groovy (Score:2)
Ruby on Rails -- A pretty cool web applications framework using Ruby
Re:Ruby Is Groovy (Score:2)
Isn't the present split between programmers about 50-50 with Windows experience and without? I know I don't run into Windows programming that often, and I tend to run into more Unix than Windows programmers, even outside Unix circles...
Part of that is probably that I tend to like the "deep knowledge crowd" everywhere, and Windows is hard to have deep knowledge of, but I thought I'd seen statistics indicating about 50-50?
Eivind, questioning...
Re:Ruby Is Groovy (Score:2)
creating Ruby on Rails = X amount of man months (alternately degree of complexity_
creating
Y is much much bigger than X.
Re:Ruby Is Groovy (Score:2)
And yeah, .NET is definately much more complex than RoR - not sure if you're trying to say that's an advantage or disadvantage or just a fact?
Eivind.
Re:Ruby Is Groovy (Score:2)
As for knowing
What I was saying was that
Re:Ruby Is Groovy (Score:2)
That said, I think the tech around C# seems very, very nice.
Eivind.
Re:Ruby Is Groovy (Score:2)
Re:Ruby Is Groovy (Score:2)
1) Whether the functions themselves are organized in an OO way
2) Whether the languages required you to be OO in your thinking
Win16 was OO it was written in organized C++. OTOH VB 3 or whatever was not OO by any stretch. Do you see the difference? This actually pretty SOP for Microsoft they tend not to push people towards better ways of working but rather build products which fit people's percieved desires.
Re:Ruby Is Groovy (Score:2)
OTOH reread the post.
Re:Ruby Is Groovy (Score:2)
Re:Ruby Is Groovy (Score:2)
Sorry, I was a bit quick to answer in my previous post, I completely missed you point. Here comes second try:
People who like Apple are hardly going to be swayed to PCs by
Neither are
So while Ruby for Mac is a nice thing by all means for Mac devel
Re:Ruby Is Groovy (Score:2)
Exactly. And people like me, who switched to Mac at home but still write .NET will not be swayed.
Look, I love looking in to new languages, learning new things - it's why I got into programming to begin with. But unless you sta
Re:Ruby Is Groovy (Score:2)
Instant defense without even an attack, such as what you have shown here, really makes one wonder if their
Now is the time... (Score:2)
Re:Now is the time... (Score:2)
Did you see Programming Ruby: The Pragmatic Programmer's Guide [rubycentral.com], by Ruby's creator Yukihiro Matsumoto? It's a freely-available transcript of a paper book, and I'm halfway through and finding it good going.
Now I'm only playing with Ruby at the moment, so I couldn't say how the examples and sections stand up to heavy industrial use, but if seems an excellent introduction and the tone an
Baskin Robins (Score:2, Funny)
This month only though, flavor of the month. Next month they're doing AJAX.
Re:Baskin Robins (Score:2)
Perhaps we should ask The Question?
Re:Baskin Robins (Score:2)
Here is a review of AJAX:http://www.epinions.com/Ajax_Cleanser_with_B
Re:Baskin Robins (Score:2)
Re:Baskin Robins (Score:2)
Re:Baskin Robins (Score:2)
OS X Ruby doesn't work with Rails? (Score:2)
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?
Re:OS X Ruby doesn't work with Rails? (Score:4, Interesting)
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).
Re:OS X Ruby doesn't work with Rails? (Score:2)
Well, actually, Apple has miscompiled Ruby since 2003. The pack/unpack functions don't work correctly. You can recompile 1.8.2 yourself and make it work just fine with Rails.
The problem is that Apple cross compiled Ruby screwy, so it thinks it's on a little endian machine when it's really on a PPC.
Converting stuff to Network Byte Order will actually give you the
Re:OS X Ruby doesn't work with Rails? (Score:2)
Another point is that many people use a custom install of Ruby to ensure that they're using the same version as their webhosting service. There's no reason to run a newer version when that just introduces an unecessary difference between your development and production environments.
Re:OS X Ruby doesn't work with Rails? (Score:3, Interesting)
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
Re:OS X Ruby doesn't work with Rails? (Score:2)
Here's a tutorial for getting a completely self contained Rails dev environment ready to go on OS X, without having to worry about the default OS X Ruby install not supporting Readline and such.
Ruby on Rails, Lighttpd, MySQL on OS X Tiger [hivelogic.com]
It's also a good tutorial for learning in general how to get the development tools you need and compiling them from source into /usr/local/
Re:OS X Ruby doesn't work with Rails? (Score:2)
It starts by installing Ruby 1.8.4 without overwriting the system-installed Ruby (it puts the new version in
Now if you'd asked why 1.8.4 might break things expecting 1.8.2, that's another question
Mark
Re: (Score:2)
Re:OS X Ruby doesn't work with Rails? (Score:2)
Re:OS X Ruby doesn't work with Rails? (Score:2)
Rails only hit 1.0 a few months ago, makes sense that they'll want people to run it with a Ruby release at least as recent, if only so people don't get bitten by security issues or bugs Rails exposes in earlier versions. FWIW I run Rails fine on an oldish Ruby 1.8.2 out of FreeBSD ports; I dare say Apple don't maintain their Ruby release as well
Because... (Score:2)
Another great tutorial, but.... (Score:4, Insightful)
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',
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
Re:Another great tutorial, but.... (Score:2)
This is what pushed me away from Rails not long after I started looking into it. Aside from API guides and the like, all real documentation on Rails and Ruby is outdated or sparse. Sure, there are lots of Rails tutorials out now, plus there's Why's Poignant Guide, but these alone are not nearly enough. The RoR community's answer is, of course, to simply buy the Programming Ruby and Agile Web Development wit
Re:Another great tutorial, but.... (Score:2)
Re:Another great tutorial, but.... (Score:2)
(Aside: You can get the pickaxe and awdw/ror books for a little under fifty on bookpool.com, fwiw. (I just ordered them yesterday.))
Yeah, it is kind of a bummer to need to shell out some cash up front for texts, but on the other hand:
a) I remember when that was pretty much the case for Perl (Camel Book), and at least I've gotten a lot of mileage out of that investment.
b) to most anyone in IT, $50 is not that much money
c) assume the best case, where RoR really is good for you and your needs, what's the
Re:Another great tutorial, but.... (Score:2)
Don't be so lazy next time, and try actually reading the blog entry where the new branch was mentioned [macromates.com]...
Re:Another great tutorial, but.... (Score:2)
Again, how many Java books did you buy, that you rebought after each major Java upgrade, etc.?
Re:Another great tutorial, but.... (Score:2)
If you like Vim for everything, more power to you; I'm still likely to
Re:Another great tutorial, but.... (Score:2)
Re:Another great tutorial, but.... (Score:3, Funny)
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.
Re:Another great tutorial, but.... (Score:2)
Re:Another great tutorial, but.... (Score:2)
postgres and mysql both have time types...
Not exactly provided by Apple... (Score:2)
Concise, interesting (Score:2)
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
Re:Concise, interesting (Score:2)
Ruby vs. ? (Score:2)
What makes Ruby "lightweight" as compared to Smalltalk and ObjC?
I would argue that Smalltalk is "lighter" than Ruby.
Ratboy.
Rails users, evangelize (Score:2)
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 s
Re:Rails users, evangelize (Score:2)
You'll find that most of the time Rails' data handling makes your life much easier than other frameworks. When Rails doesn't quite make the right decisions about your data you can always override the default functionality with the same or less work than would be required using other frameworks.
In my opinion, Rails is a
Re:Rails users, evangelize (Score:2)
I've developed some pretty large scale things with RoR that required a lot beyond what the framework offered, and it's been fine.. although in hindsight I can see how I should have done things a bit different. That's mainly due to a lack of knowledge of Ruby rather than Rails though. Ruby is a lot more powerful t
Rails is OK, but exposes too much SQL (Score:3, Informative)
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!
Too much SQL? (Score:2)
- no mass updates/deletes.
- no aggregation (count,max,min,sum)
- no dynamic queries
- restricted joins
I've heard they fixed it to some degree in EJB ver. 3.0, getting it close to the actual SQL expression power.
Do you know a persistence framework
J2EE (Score:2)
The right tool? (Score:2)
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?
Re:The right tool? (Score:2)
I'm confused. CSS works with HTML to do page layout. Ruby on Rails uses template which are written in HTML and CSS just like any other web page.
As far as just plugging it into the database, I suppose Rails is as close as you're going to get unless you just want to use a Content Management System (try joomla if you want a CMS). With Rails you build your database backend, then create a few lines of code to have Rails pull out the data and put
Re:The right tool? (Score:2)
The tricky middle ground is the one where someone is happy with their current ISP setup, but would like to add a Rails app. Then you have to decide whether the language is promising enough to justify a change. Usually, it doesn't, so people go back to what they were doing before.
Me, I've got my ow
I'm trying to learn RoR, but I have some issues (Score:2)
Re:I'm trying to learn RoR, but I have some issues (Score:2)
Once you've worked out your authentication, it's pretty easy to use scaffolding to create the basics of yo
Re:I'm trying to learn RoR, but I have some issues (Score:2)
His take is that you can work right inside the framework using nothing but ruby to manipulate your activerecord objects. This should be better then directly manipulating your tables because theoretically your activerecord objects keep your relations, valid
Re:I'm trying to learn RoR, but I have some issues (Score:3, Informative)
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.
Compared with Django, RoR doesn't cut it. (Score:3, Interesting)
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.
I thought it sounded familiar (Score:2)
no Locomotive love? (Score:3, Informative)
mod parent up (Score:2)
Andrew
WebObjects (Score:3, Interesting)
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.
Hey, What about Catalyst (Score:2, Interesting)
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.
Re: (Score:2)
Re: (Score:2)
Re:Figures (Score:2)
Only those developers who can't see that a tight coupling between your code and your database is not a good idea.
Re:Figures (Score:2)
How does reinventing the GUI wheel come into it? If anything is providing yet another re-invented GUI it is Rails. And, having platform independent GUI but producing code that can be very fragile if you attempt to migrate between different database products (or even if someone else radically changes your schema) sounds plain nuts to me.
Re:Figures (Score:2)
Re:Looks interesting (Score:3, Interesting)
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 [napcs.com]
But I still have to check
Re:Looks interesting (Score:2, Insightful)
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 a
Re:Looks interesting (Score:2)
Re:what's so special about RoR? (Score:2)
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!!
Re:Mac and Ruby history (Score:2)
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.
Re:Mac and Ruby history (Score:2, Interesting)
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 wi
Re:Mac and Ruby history (Score:2)
Re:Mac and Ruby history (Score:2)
It is an interpreted language without even a native code translator (at least not one that is out of early beta).
If you would like to explain how that is supposed to be fast , I would be very interested..... Unless, of course, compiler writers have been wasting their time for the past 50 years.
Re:Mac and Ruby history (Score:2)
Variety is the spice of life. We don't want to do everything in PHP or whatever 'framework' you propose to be the great end-all. We'd be bored.
Besides, Rails is not only very young, but it works fine, performance-wise, for 75% of the business sites that need database support. You wouldn't use it for Amazon.com, but it might work fine for Gary's Auto Repair's business site, which is the sort of thing most free-lance developers are doing in their spare time.
Oh, and don't be "afraid t
Re:Mac and Ruby history (Score:2)
I have heard this sort of false statement so often!
Sorry, but this kind of thing does not work fine for these sites. They may work find for these sort of sites most of the time, but what general
Re:Mac and Ruby history (Score:2)
No, you are wrong. Most of Yahoo is not written in PHP, and Google does not use Python for most of its applications. They use these languages for some aspects of their sites, but increasingly pass of 'heavy lifting' to higher performance systems based on J2EE and C/C++.
Re:But where would you use it? (Score:2)
Re:Wish they'd spend this time patching bugs (Score:3, 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 issue
Re:Apple did'nt write this tutorial (Score:2)
Re:Usual omission... (Score:2)
Be interesting to see if this is what Part 2 will demonstrate.
Re:Usual omission... (Score:3, Insightful)
before_filter
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