Skip to content

Instantly share code, notes, and snippets.

@solnic
Created March 29, 2012 12:33
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save solnic/2237029 to your computer and use it in GitHub Desktop.
Save solnic/2237029 to your computer and use it in GitHub Desktop.
6 steps to get up'n'running with Rails on OS X

6 steps to set up a rails development environment on OS X:

  • install Apple Command Line Tools
  • install homebrew[1]: /usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
  • install rvm: bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
  • install ruby rvm install 1.9.3
  • install rails gem i rails
  • start a project rails new myproject

[1] Use brew command to install whatever database engine you need, ie brew install sqlite

@pixeltrix
Copy link

Whilst ruby-1.9.3p125 will compile using llvm-gcc, there are plenty of common gems that rely on third party libraries that wont. Also the description for Rails.app talks about it being used by experienced developers - it's not intended to be just a mac version of railsinstaller.org.

@masterkain
Copy link

Does rvm install alone take care of switching to the new interpreter and set it up as default? You might want to add an extra step :)

@mpapis
Copy link

mpapis commented Mar 29, 2012

@masterkain it does in rvm get head ... actually I was considering adding flags --ruby[=1.9.3] --gems=rails so you could go with 4 steps

@mig-hub
Copy link

mig-hub commented Mar 29, 2012

The all thing is more about Ruby than Rails anyway.
So it could be worth having a Ruby.app instead of a Rails.app
I wouldn't use either but that still make sense.

@mig-hub
Copy link

mig-hub commented Mar 29, 2012

What we need is a RailsOS that could boot from a USB stick.
So that you've got really everything you need and we all have the same.
No problem with Winshit or Macinpoo anymore.
Just a thought.

@adrianpacala
Copy link

@mig-hub please spare us any more of your thoughts.

@mpapis
Copy link

mpapis commented Mar 30, 2012

@solnic now you can do it in 1 (One) step: https://gist.github.com/2246595

@mig-hub
Copy link

mig-hub commented Mar 30, 2012

@adrpac

First of all, I don't think programming should prevent one from having a sense of humour. And second because the things I've said are only half jokes.

In fact I even like this topic a lot because it refers to problems I have everyday at work.
The problem of choosing between monolithic and modular.
Both have pros and cons and it is difficult to make a good choice.
Because the more something is modular (the path I usually take most of the time), and the more you have to deal with versions and dependency.
Which could lead to a nightmare and sometimes defeat the point of simplicity.
And in that respect, I don't think this is a Rails specific problem.

Now I think Katz is a very clever and respected programmer.
Presumably better than most of us (I would assume).
And also recognise the problem of having a Ruby environment installed (not Rails in particular) for building web-applications.
I currently have an intern here at the studio to who I have to teach these things and while I am doing/explaining it, I feel there is a shortcut missing somewhere.

Nevertheless I still find the project somewhat useless especially because one of the purpose is to fit a newbie AND a regular user.
Just because I used Locomotive myself a while ago, I liked it but then when I became more interested and skilled I felt the gate it was between me and ruby and the rest of my machine.
But it is a nice way to discover the thing in a painless way and for that, a simple sandbox will do the job and would cost less.

Now even for newbies I sort of feel that Rails already does too much magic that prevents users from knowing what they are doing.
It brings bad habits and misconceptions, so I wouldn't like that to happen to the install side as well.
And here it is not necessarily a valuable argument that people could share, more like a feeling, but we are made of feelings and our choices are often based on them, aren't they?

Now I'm sure the purpose is to get the best of monolithic and modular, otherwise it would be pointless.
And this is just something I can't manage to believe in.
Maybe I'm a bit too extreme, but I don't.

Hence the joke about RailsOS.
This is still a joke but if somebody would do that, I would not find that ridiculous.
Or no more ridiculous than a Rails.app

After all, the purpose of a monolithic version is to fit one problem and fit it very well.
So considering the fact that majority of people will deploy on Heroku, one could easily offer a Linux distro that mimics exactly what you have on Heroku plus everything else you need like text editors and stuff.
You start it from a USB stick, if you dislike it, then you never boot it again.
After all, the all thing about Rails (you like it or not) is convention over configuration and hiding complexity by choosing the best option possible for the developer and then hide it.
And there is nothing wrong with this.

Now nothing in there is a truth, these are just my thoughts.
And I would be very pleased if Rails.app goes out and make the happiness of many people.

Also I would like to apologise @adrpac (maybe others) if my irony made you feel uncomfortable.
I don't want to turn Github into a silly ranting blog either.

Have a nice day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment