I run Windows on my MacBook.
Windows - because I'm a .NET developer and our startup is mainly Microsoft-based. And, to be honest, I like Windows 7. Finally, a decent OS from Microsoft.
And MacBook - because it's simply the best hardware you can get for it. The unibody design is awesome, the keyboard & touchpad are great, the 17" screen is fabulous... I love my Mac. I'm practically an Apple fanboy.
The only thing I don't like about my Mac - is Mac OS X.
It just didn't suit me from the very beginning. That blurry font-rendering, that mouse acceleration you can't disable... Also, I'm a gaming junkie and, let's say, Mac is not the most popular gaming platform.
But let's try a Mac for a change
Yesterday we had a new project idea and my cofounder suggested we do it on Rails. I was pretty open-minded about this. After all, it's always nice to try new languages, frameworks and environments, right?
And, hey, all the cool startup guys do their startups on Macs! There must be a reason, right? I want to be like that 37Signalish/YCombinatorish startup crowd. I want to be like those cool kids doing trendy Web 2.0 apps on their Macs. I don't want to be "a PC" from the Apple commercials. I want to be the "skinny-hipster-Mac". So let's develop in Ruby. Hell yeah!
Also, Macs should be easy to use, right? Everything works "out of the box", right? I mean, my Mac came from Apple. Same company that made my iPhone. And my iPad. And my iPod. And my other iPod (gee I really am an Apple fanboy). Also, I'm kinda familiar with *nix operating systems, the Bash command processor and stuff... So, there should be no problem right?
"Totally", - that was Max, my cofounder, - "no problem. Works right out of the freaking box"
The long journey
"Out of the box" turned into 40 hours of installing, reinstalling and configuring stuff. I'm not judging, just describing the steps I had to take to prepare my Mac to write some Rails code. Maybe it's because I'm just a dumb Windows guy.
First I figured that I need, well, Rails installed. Along with a Mercurial client. That should be enough to get me started and shouldn't take more than an hour to install.
While trying to install both Rails and Mercurial I got a bunch of error messages about an outdated Python version I had on my Mac. Fine, let's get a fresh version from Python.org... Didn't work. The "Pyhton.prg" version installs side-by-side with the built-in "Apple Python" and Mac OS still thinks I have an old version... After some head-scratching I decided to let my Mac check for updates - and bingo, Python was updated. But still, the version was not good enough for Rails & Mercurial... After another hour of black magic with python & homebrew and forcing another software update the Mercurial client was finally up & working.
But not Rails. It turned out it requires the "ruby-dev" package installed. And, well, the only way to get "ruby-dev" I found - is to install XCode. The big, heavyweight development suit from Apple.
Fine.
I tried downloading version 4.0 but the Apple website gave me an error in Chrome. I tried opening it in Safari, and it asked me to regster as an Apple developer.
Fine.
Let's get a developer ID. I filled out a lengthy form, confirmed my email address, got myself a developer ID, and... the Apple website showed me the exact same error message I got from Chrome earlier.
OK, there is another way to install XCode - to get it from the AppStore. But you need a Mac OS 10.7 Lion for that. Which is another hour of downloading, another hour installing and another $30 to Apple, because Lion is a paid sucka... OK, I'm on it. Gimme that Lion.
Another couple of hours downloading XCode 4.2, installing it, configuring all the "gems", and finally, after 40 hours of having sex with my Mac I was finally able to open "localhost:3000" and start writing some code.
Same on Windows
During that weekend I had to reboot to Windows a couple of times to fix some minor bugs in our helpdesk app and do some support stuff... And at some point, while in Windows, I had to make an urgent fix in our Rails app. I was too lazy to reboot back to Mac OS. So I decided to fix that on Windows.
I went to RailsInstaller.org, installed Rails, "pulled" the app from the repo, made the change, tested it on "localhost:3000", and pushed my changes back to the repo. And all that - in 9 minutes.
Wow.
9 minutes. Including the coding part. And including the time I spent Googling for tips & best practices on setting up Notepad++ for Rails development.
Sorry, folks. Call me a pervert, but I'm doing Rails development on Windows now.
I know!
I know that it's just me being dumb and, maybe, too used to Windows-ish ways of doing things. I know my Mac software was outdated. I know that every Mac developer probably already has XCode installed. I know I was having problems with the Unix-part of my Mac, not the shiny part of Mac OS. I know that in Windows it also takes time to install Visual Studio, SQL Server and other stuff to get you started (none of this is required for Rails though), I know comparing setup times on a platform you work with daily to a platform you've never used before is a bit unfair.
Some day I will make another attempt to move to the Light Side of the Force. Who knows, maybe even learn Vim! But we have a project to get done, so... Maybe next weekend.



39 comments:
You look like candidate for a Linux user, not a Mac user to me :)
It is really hard for me to believe that you can't find rvm to setup rails. I'm a Windows user and first time Mac user. Even I managed to find rvm and setup rails in less than 30 minutes.
Anon is correct; the seamless (and, I'll go as far as to say 'proper') way to install the latest Ruby/Rails on Mac, Linux, may be even on Windows is to use RVM (http://beginrescueend.com/). The prerequisite, of course, is Xcode 4.x for a Mac (this will be the most time consuming position of your install).
I might be wrong, but you'll run into a lot of problems when developing Rails apps on Windows when using certain gems. Not sure which ones nor what the problems are, but it might be worth finding out.
By the way: http://ryanbigg.com/2010/12/ubuntu-ruby-rvm-rails-and-you/ <- this is great.
PEBKAC nothing more
Fair warning: Rails development on Windows will make you hate Rails. It's ungodly slow, and a lot of native extensions just won't compile, even with a proper Cygwin environment. I say that as a guy who runs Windows 7, but I do *all* my Rails development on a headless Linux box on my LAN via SSH/Samba.
Do yourself a favor and install Ubuntu or Fedora, instead. Seriously.
All you really needed is RVM and Homebrew and you would be done.
I moved from .net to rails about a year ago, setup of my dev machine was tough on mac but worth persisting with. Deployment is another nightmare for a newbie that you may have to deal with unless you use heroku but again its worth it. I wouldnt go back to .net or windows now.
Why do people keep developing rails apps on mac when they are going to deploy it on linux anyway? Seems pretty dumb to me.
For what it's worth, I just did a completely fresh install of Lion, and was back up and running in a developer capacity in a couple of hours. XCode, Homebrew, and RVM are the things you have to know about, I guess.
IMHO if you were a MAC user and moved to Windows for just a lil bit, you'll be similarly frustrated. I am a Linux fanboy, and I have a very hard time figuring out Windows! VERY! But, thats just because I am used to a different environment and know the nitty-gritties pretty well (example, updating python from external sources was a typical rookie mistake)
so, I don't think anyone is wrong here.
i use macports... installing unixie things without ports brew or something else is painful. made teh switch in 06 when teh firts intel machines came along. although win 7 is great i still need cygwin and a million other things that the mac does nicer. I guess being a mac dev is less painful if you embrace and love linux/unix.
While this doesn't help you get your time back this time, next time I do encourage you to use rvm as the other posters have previously indicated — but instead of actually installing the massive XCode bundle (4GBs is a lot if you're using an SSD) I recommend you check out this 300MB bundle you can install which is just gcc and the other bare minimum tools you need to get ruby and the various gems working:
https://github.com/kennethreitz/osx-gcc-installer
Also, one small gripe is that it sounds like the majority of your complaints were actually trying to get Python and Mercurial working. This isn't really the fault of OS X nor does it bog down most Rails devs working on OS X. Just some perspective!
You're trying to use a Mac like it's a windows box, with the same install experiences etc. I find it difficult to understand how you didn't look for "Mouse" in your system preferences - it even comes with a video to show you how to... oh nevermind.
The development experience on a Mac is typically read right out of the box. You have Ruby 1.8.6 installed, so literally you just drop in "gem install rails" and you're off.
You don't need XCode unless you want to install MySQL or PostGres locally - and even then you don't need it - it's just for compilation in the same way .NET needs to be installed on your machine to... oh nevermind.
Look, I don't want to be rude, but honestly: 40 hours and you can't get Rails running on a Mac? I find that hard to believe.
I pretty much had the same experience. Other developers (specially the cool kids) gasp in shock when I tell them I much prefer Windows 7 to MacBook. At first I thought it was because I am a .NET Developer, but alas the MacBook simply has it's pitfalls just like Windows.
The fun part is what you've been through! All that play got you some experience! :)
And for me, I had some day trying to install Mac OS X on some old PC I've here. You can imagine from your experience! LOL
One of the greatest weakness of mac os x is despite being *nix system it doesn't come with a package manager. If you decided to travel down this path again I highly recommend first installing either macports or homebrew and using those tools to install packages. I've only worked with macports but have heard good things about homebrew. I know macports has tools for selecting different python versions and I believe homebrew has something similar.
simple solution - get yourself a free environment in AWS and do all your setup there. even can do spot images/backups of the entire server and clone as needed. (now don't get me wrong - I love my mac and it's my go-to dev platform). but now a days, you have connectivity to the net everywhere and therefore a connection into a safe and secure virtual server you can do what ever to in a *nix environment. I've been running over there for several months 4 micro server for a total of $6. Very very inexpensive platform for development.
Hey @biggestJohnson, Thanx!
I went off and did this:
http://www.codeitalready.com/2011/11/hello-aws.html
awesome! gave you credit of course.
As far as the actual article, I like it when people learn in the open. I can't tell exactly how much (if any) snooty-ness is being expressed, but overall I'm glad to see you share your experience & give honest feedback. It takes guts & helps others make their choices.
I'm also glad that most comments seem to be productive & even keeled, good job internet ; )
I used Windows, Linux and my Mac to develop with Rails.
Windows: too many limitations related to gems, especially that ones that need compiling.
Linux: Smooth and perfect.
Mac: All that XCode requirement issues, the need to register as developer etc. But after these issues, no other problems, all was fine, for the little time I used it anyway.
I think it's only a matter of trend and not productivity. I prefer linux in many ways.
But this is only my taste.
Hello Jitbit,
Next time you need to install the odd framework or library on aMac either use Pacifist if the library is available on an install DVD / CD or is in a .pkg library,
or
install and run MacPorts.
This is clearly an intentional attack from a Microsoft fan boy (if there is such thing) to Apple. If you had just went to rubyonrails.org you could have gotten the right instructions to get your rails development running in less than an our. So, I guess you should just get back to your dumb Windows environment.
An other alternative is to run a Virtual Machine in windows and install Ubuntu on it. Go for the 8.04 version that is very stable and the one that Heroku uses for its servers.
Familiarize with the command line, apt-get, then look into RVM, then it shouldn't take long.
You have inline styles and inline JS? Pla-eese.
Smiling here, very funny, because you have barely scratched the surface and it really doesn't matter if you choose the Mac or PC. If you go open source, there is a huge toolkit to tinker with. But.... it is free, if you don't count the investment in the learning curve! Start ups usually invest in time vs. money.
Cheers and have fun!
Obviously you don't need another person to tell you the same thing, but you're doing it wrong :)
Typical Apple / LINUX fanboi reaction to a .Net dev. Machines as fashion accessories and a rebel stance define this crowd of posers. Gimme devs who get work done.
Notepad++ ftw!! And as any professional will know, the IT world is made up of 70% windows, 29% Linux and 1% Mac (os terms). And your not a professional if you use Mac os. Take apple genius's for example. "but hey haters gonna hate"
The abbreviation for "you are" is "you're" not "your". You can always tell when a developer writes something because they can't spell worth crap and their (not there) grammar and usage is atrocious.
+1 for linux, package managers are definitely worth their weight in gold
I recently had my first experience with rails as a frontend developer - prior to starting the job I installed rails on my windows system to familiarise myself with the environment. The setup was relatively painless. When I finally started there were numerous gems to install as the project was already quite mature. I quickly found myself in situations where gems were breaking on windows but at the time I thought this was due to my lack of experience with rails. After a full day of slogging (and thinking I was making headway each time something got 'fixed') I gave up. I then switched over to an ubuntu install and had things up and running in no time.
There are difficulties with learning any new platform. It does not sound like you are an Apple fanboy or even that you were open to learning new stuff. Ever heard of learning curve?
I tried to learn RoR with Windows but I couldn't find a good terminal, didn't want to mess with cygwin, and didn't want to use cmd. Let us know how you do with both environments, always interesting to see what people do with their environments. :)
> And your not a professional if you use Mac os.
Our office uses Macs for Java development that is deployed on Sun Solaris. Works superb. A bit of a learning curve in the beginning, but then that's what a brain is for, isn't it?
I work for a law enforcement agency.
We made the move from Windows/.NET a couple of years ago. Instead of Rails, we chose Grails instead, due to the maturity of the JVM ecosystem. We develop on Mac, using IDEs based on Eclipse (STS).
Grails just works. The learning curve was small, and we have been able to take advantage of a lot of open source technologies (e.g. SOLR for search). We have deployed over 15 major applications in the last 2 years, all on time and on budget.
Working with OSX has been great; I dread having to go back and work on some of our 'legacy' .NET apps.
Done in 9 minutes on Windows. Can the Mac people do that? I'm sorry about your pain, but, unless you are a Mac guru, the pain will still exist.
Apple's products have always been considered toys and Microsoft's are for real business and development. Now, you know which way to go. Next, have the Mac Rails people try running Rails on Windows. Will their experiences be as bad as yours was on a Mac?
Bitter fan boys on both sides. Tiresome.
Its a mindset to adopt on any platform for installing on to a platform. Mac you use macports or any other package library, on Linux use apt/yum with your repo of choice and windows you install from a list of links to installers.
Taking a windows mentality to mac OSX won't work. Your lack of experience caused your delay and the wrong mindset.
I know exactly how to cook perfect beans on toast but wouldn't know where to start with a roast. That must mean baked beans are better then roasts and roasts plain suck???
In the long run, the platform got most support wins, if the majority of the rails users uses mac, then mac platform will be much better supported than other platforms. On the other hand, if most rails dev uses linux then linux will get more supported. But from my experience with rails on a mac has been a smooth ride. homebrew is an excellent package manager, and rails are just as easy as entering a command "gem install rails" also gems are managed by Gemfile by bundler without any hassle, I don't quite get it when people are messing around with internal system files when they can just use existing framework structure that the dev developed to alleviate the pain of the process of going through all the mess to setup environment.
Maybe stubborn is the right word to describe them?
Hi,
I am interested for your nice information. I like this article.
Thanks
Post a Comment