Getting Started in Rails is Insane
Insane. And not in a good way.
James Johnson posts a “beginner’s” guide to getting a modern Rails environment up and running, in Rails and Web Development - Take the First Step.
(note: I’m not really trying to poke fun at the tutorial here… the point is that the tutorial is actually mostly accurate: please read on)
Don’t people realize that this is crazy? The steps seem to be as follows:
Buy a Mac.
It’s OK if you don’t have one. They are cheap on Ebay! It will only cost a few hundred dollars to get an old computer to write Ruby like a cool kid. If you want to use Linux, sorry, you’re kind of on your own.
Install Xcode.
We really just need some of the stuff that comes with Xcode. But we’ll just say we need Xcode for brevity. Just download this 1.6GB package and you’ll be rolling along in no time!
Open the Terminal.
Don’t worry about what it is or where it resides on your computer. Spotlight will find it for you. And don’t worry about what you’re going to enter into it. Everything will be fine. Trust me.
We won’t accidentally delete your home folder or anything like that.
Install a package manager.
What’s that, you ask? Don’t worry about it!
Just copy and paste this code into your terminal. It will download and evaluate some code that someone posted on a website. It’s fine. Trust me.
Oh, and if the code that we just blindly downloaded from a site on the Internet asks you any questions? Just hit Enter to say OK.
Now install the Ruby Version Manager.
“But we just used Ruby to download and evaluate some random code from the Internet”, you say? How astute! Yes, you already have Ruby. But you have the wrong Ruby.
Trust me. You need a new version of Ruby. And you need extra software to juggle all of these Rubies. It’s fine. Everybody does this now.
And we’re going to run more code straight from the Internet now. Except, this time we’ll feed it straight to the shell. It’s OK. It’s from Github.
Now just use an editor you don’t know to open a file you didn’t know you had, to add some code you don’t understand.
Now quit the Terminal and re-open it for some reason.
Now install that other Ruby we talked about.
Yes, yes, I know we’ve already been using Ruby in half of these steps. But like I said, we need a new Ruby. Just copy and paste a few more things. They’ll do stuff. It should be fine.
Update your gems… whatever those are.
Install Rails.
Install Bundler (this is something you don’t need; but you’ll need it).
Now make a Rails app and run some code that will create about a billion different files that you don’t need to understand.
Migrate your database.
Don’t worry about what a migration is, or where your database came from, or where it is now. It’s fine. Just rest assured that there’s a database somewhere.
Start the server and enjoy!
You’ve touched compilers, blindly downloaded code, modified your environment, installed a parallel version of Ruby, created a CRUD application and an accompanying database (and data model!), and started an application server, all without understanding a single thing!
You can use that editor you don’t know how to use to look at files that you don’t know the purpose of.
OK. So this got really sarcastic really fast, and maybe a little nasty. Sorry if I have offended, James. I really commend the effort to get folks into programming. I really do. I want to see people programming, and learning to program. But I also want to see them understanding. And I don’t like to see people starting out on a massive undertaking like this with a “hand-wavy” approach to all of the steps.
But again, my point is not to criticize the intentions here. My point is to criticize the astounding complexity and the piles of “magic” involved in getting up and running with a web framework that’s supposed to be the easy one, out of the bunch.
The only thing I’d change out of all these steps is to recommend an easier text editor. Otherwise it’s pretty much correct about what you have to do to get up and running, and to not be in total isolation from the rest of the Rails world. If you develop a Rails app of any size at all, you will be juggling Ruby versions, gem dependencies, plugins, etc..
And that’s crazy.
After downloading gigabytes of software packages and hundreds of thousands of lines of Ruby code, creating an application and a database, you still haven’t even touched the Ruby language, or any programming concepts.
Stay tuned, and I’m going to see what I can do about this…
