Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am coming from a .NET background and beginning my journey into the Mac OSX\Ruby\Rails environment.

A lot of the resources I have found such as this one have between 5-10 steps for setting up a Ruby\Rails environment.

My question is, what are the bare minimum requirements for setting up a working Ruby\Rails environment?

Can I use RailsInstaller and be done? Should I install all of the tools that the above link suggests (XQuartz, Homebrew, RVM, etc) even though I don't really know what they do?

Right now I am not being paid to do this, but am also curious what professional Rails developers do when setting up an environment.

I am also more concerned about the why as in why I shouldn't use RailsInstaller or why I should install RVM.

share|improve this question
4  
The first thing you'll need to do when switching from Windows to OS X is use '/'s instead of '\'s :) –  amindfv Feb 20 '13 at 19:54

3 Answers 3

up vote 3 down vote accepted

Installing various bits and pieces and different tools and getting them working together actually turns out to be fairly constant in the Ruby on Rails world.

This was a change for me as the previous frameworks I'd used changed much slower and had far less choice (and changing) of which tools to use.

Rails installer is great and I would use it.

Xcode is pretty essential on a mac for installing stuff, make sure to avoid the older Macports.

Homebrew is also a really good idea - it will help you install stuff and diagnose any issues. It's really more of a help than a hindrence. Plus is easy to install.

RVM will help you with your Ruby install and version changes. Both Ruby and Rails both have versions changes every few weeks, not every few months/years as was common with older languages and frameworks.

Part of the trick of being a full-stack rails developer is being comfortable with exactly this kinda stuff. Rails gives you a ton of benefits by using convention over configuration and DRY principles, so you write less code. The 'cost' you pay is needing to be good at the infrastructure stuff to install components (such as gems) and systems and not be re-inventing the wheel by writing them yourself.

share|improve this answer
    
Thanks for your answer Michael. Regarding rapid version changes, is it common when starting a project to pull the latest stable release of Ruby\Rails and not change version until code complete (but have the ability to switch between multiple versions for other projects, which is where RVM would come in)? –  jeuton Feb 21 '13 at 4:24
    
Sure. Yes, what you normally do is pull the latest version at the start, say 3.1.5 You might work on that for a couple of months. The official version goes up to 3.1.6 as it's normal to upgrade to that (changes will be very minor). Before you go live a security alert comes out and so you go up to the new version, say 3.1.8 then go-live with that. Major upgrades like version 3 to 4 take a lot more planning. With rails even 3.0 to 3.1 was a big upgrade due to the introduction of an 'asset pipeline' for css and js. Again it's the benefit and also price of rails. –  Michael Durrant Feb 21 '13 at 4:50
    
Thanks Michael. –  jeuton Feb 21 '13 at 14:56

Use this: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book
It has an excellent walkthrough of the setup process. I've set up RoR environments on OS X, Linux, and even FreeBSD (haven't tried Windows yet) using it.

I would also suggest picking up a good book on the Ruby language itself. There's a lot of coolness there that you might not come across if you're doing standard CRUD-type stuff in Rails :)

Also, if you're a fan of IDEs (coming from .NET/VS), I would recommend RubyMine. Some of the handholding it provides can be nice while you're learning.

share|improve this answer
    
The plan is to learn Ruby, then Rails. I picked up the pickaxe book and am going through that. I'll take a look at that tutorial for getting set up, and go through it once I'm ready to tackle Rails. –  jeuton Feb 20 '13 at 17:35

One advantage of using the railsinstaller would be that you can get started with Ruby on Rails programming right away. There can be some headache with getting the typical Ruby on Rails tool set installed which the railsinstaller takes care of for you. After that I would follow James Adam advice from another answer and do the Ruby on Rails tutorial. Has to why you want to use RVM, that allows you to use multiple versions of Rubies/Gemsets such has JRuby(which is a ruby that runs on that JVM).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.