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."
seems like a nice tutorial, even for non-os x users. I'll have to bookmark it on my site.
seven minutes between the article posting and the first anti-mac sentiment? slashdot, you feeling okay?
for a minute there, i lost myself...
Now I'm finally able to get the Ruby Apple in Lufia on the SNES?
I rm -rf
yu suk nob is an anagram of ruby on rails. Try it yourself!
Jobs: Ruby is groovy man. It's got like, vibe. We had to get in on that.
.NET offers more flexibility with less development worries and higher performance...
.NET can accomplish all the same....
.NET does all this! Why won't anyone listen? You believe me right?
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.
May the Maths Be with you!
Not that surprising as both Mac and Ruby were very popular in Japan already and Mac OS 10.2 also had Ruby installed by default. Using Ruby therefor seems like an easy step up from Applescript.
And now with Ruby-On-Rails being a killerapp for forward looking web designers seeing crosslinks between Mac users and Ruby users reaffirms the designer's idea that developing in Ruby is a reachable goal, as many others Mac users seem to have taken a similar path and already master Ruby.
...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 in May. This will be good for those among us who have become addicted to O'Reilly's efficient guides.
From TFA " And all members of the Rails core development team work with Macs "
And then FFP " seven minutes between the article posting and the first anti-mac sentiment? "
Hah!! I wont anti-Mac but could this be another bad technology like Macromedia Flash, very annoying to users yet the darling of developers?
This month only though, flavor of the month. Next month they're doing AJAX.
Comment removed based on user account deletion
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.
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?
So, you think reinventing the wheel when it comes to GUI is a great idea? One database, one platform independent GUI - sounds perfect to me,
You all just like saying "Ruby on Rails."
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?
The authors of rails books need to stop writing tutorials and write some comprehensive documentation. Even the page is quite lacking.
:discard_year => true)
: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)
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
If religous zealots don't believe in Evolution, then why are they so worried about bird flu?
I, for one, welcome our new overlords on Ruby on Rails on Mac OS X (roromoxes?).
:D.
Especialy when I hope to be one of them
In what (will be) new in rails 1.1, you will find more interesting stuff about that beautiful framework and its future. Worth reading if you are flirting with RoR.
"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...
The Apple Developer Connection doesn't supply any attribution for their articles, but this one was written by none other than Mike Clark, who along with Dave Thomas runs the always-sold-out Pragmatic Studio 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.
ce n'est pas un Sig.
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/">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.
A Passionate Independent Musician
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
I'm not trying to flame or Troll here but I would like to know what the big deal about RoR is? What can it do that PHP or Perl/Mason can't? Is it just super easy web/db development? The reason I ask is I'm looking for a new language to learn this year and I'm torn between Python and RoR. I'm already fairly adept at interfacing both php and perl with mysql, what advantages are there at choosing RoR? (I'm not looking for because it's cool... I want to know if it's just hype or if RoR is useful enough to ditch PHP)
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?
gameDB
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!
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?
Democrats or Republicans. They are both taking us to the same place and they are not afraid of us anymore.
Comment removed based on user account deletion
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).
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
... the majority of Apple users don't care about Ruby or Ruby on Rails, so there really isn't a reason for a Software Update upgrade that only .5 % (maybe less?) of their users want. For those that do care (such as myself) it's a relatively painless upgrade doing it yourself.
Two Minus Three Equals Negative Fun -Troy McClure
- 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 that doesn't expose SQL and yet gives you the power that SQL does?
I hope they've told this guy about this new article.
Scared of flying, pointy things snce 1979!
Why the fuck do we need a new fucking name for a movie. Jesus Christ it's just a fucking .mov file!
Great!
:) And yes, I am a programmer myself. But if I wanted to program in Ruby I'd probably have found a tutorial somewhere already.
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. 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
P.S.: This is not intended as a flame, just as a question where Apple's priorities lie.
This is all about Ruby, which is a programming language! Everyone knows you aren't programming a Mac unless you're slogging along with XCode.
So, is this Rails things really official? I wouldn't want to get in trouble.
It's not as if J2EE is the only way to do web application development with Java. Some times a Mack truck is needed, most of the time a pickup will do.
Lies about crimes
So, you think reinventing the wheel when it comes to GUI is a great idea? One database, one platform independent GUI - sounds perfect to me,
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.
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.
But google uses python. Whats wrong? Python is dying because of its boring board of directors? Missed the train?
So, please elucidate.
What makes Ruby "lightweight" as compared to Smalltalk and ObjC?
I would argue that Smalltalk is "lighter" than Ruby.
Ratboy.
Just another "Cubible(sic) Joe" 2 17 3061
I used Locomotive when I was playing with RoR a few months back and it is amazingly simple. Locomotive is easy to install, run, and even easy to get rid of if necessary (just drag it to the trash like everything else).
Andrew
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.
I bow before your masterful buzzword-fu. You must have great hair. Will you teach me to leverage my competitive synergies?
You want the truthiness? You can't handle the truthiness!
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
I've run the same non-trivial Rails app on three different database products (MySQL on the old Web host, PostgresQL on the new host, and SQLite locally) with minimal headaches -- just migrate the data, tweak a config-file setting, and It Just Works (tm).
"I call a baby goat a 'goatse.'" -- my non-Internet-savvy 6-year-old stepdaughter
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...
Which J2EE development environment are they comparing to? Personally, I like WebObjects. As far as I can tell... Apple was and still is doing everything RoR is doing. Apple (NeXT) just started doing it about a decade earlier. Would anyone care to point out something I'm missing in WO that RoR offers? Well... other than hype?
What is this talk about tight coupling and databases? The ORM in rails is not database vendor specific. I don't know a single framework that enforces a database vendor. I'm really confused about what you're talking about. In order to change database vendors in rails you change the database type in one config file and the database adapter automatically changes. The SQL generated by ActiveRecord is standard and the messaging and protocols to the database are specific to the adapters included in rails.
If your schema changes you just change your models if that is even necessary since you don't have to define any of the field names in your models by default so it is highly likely they will just work. If that fails you can always use database migrations which allow you to not only represent your schema in ruby but also to version your database. This works very well with a version control system.
No one should be making drastic changes to some centralized production schema that isn't somehow recorded in a version control patch that can be checked out and run to update your local development/testing database schema. Then you can test your web application code against the new database schema before submitting changes to the repository.
I've run the same non-trivial Rails app on three different database products (MySQL on the old Web host, PostgresQL on the new host, and SQLite locally) with minimal headaches -- just migrate the data, tweak a config-file setting, and It Just Works (tm).
Right. Add a foreign key constraint to the PostgreSQL version. Show me an automatic migration of that to the others. Add a couple of 'text' columns to the PostgreSQL version. Show me an automatic migration to Oracle.
Sorry, but Rails is primitive.