views:

1099

answers:

7

I'm really excited to start programming in Ruby with the Rails framework; I've read great things about Ruby on Rails! I've gotten myself a couple of books, thumbed through a few tutorials, read some forum threads, but I'm already stuck on Step One: Installation.

I guess I'm more used to the One-Click install local environments of MAMP. Is there a Ruby equivalent... a download that you run and instantly get the most current versions of Ruby, Rails, SQLite running locally?

I'm using a Mac, running Leopard, and am aware that all of the aforementioned technologies ship with Leopard (except maybe SQLite). The books that I have reference newer versions and the last thing I need is to try to retrofit a tutorial to work with my version!

Oh... and one more less important question: What the heck are Gems and is that something that I need to make sure is fully updated too?

Thanks in advance!

+1  A: 

Take a look at FiveRuns Install. It's a free Ruby on Rails stack that you can download.

RubyGems is the Ruby standard for publishing and managing third party libraries. Check out the User Guide.

Have fun!

John Topley
I think this might be what I'm looking for! I'll give it a shot. How does something like this differ from Locomotive? http://sourceforge.net/projects/locomotive
Sam
+1  A: 

I have no idea what mac os are you in but Leopard (10.5.x) already have ruby installed, all you need is to updated the gems using

gem update rails

in your command line.

if you're on Tiger (10.4.x) the installation is broken, and please follow this link.

balexandre
+1  A: 

You should also have a look at Phusion Passenger - this, along with the prefpane, allows you to have apache VirtualHosts set up the easy way.

Matthew Schinckel
+4  A: 

Hi there.

Installation is pretty confusing when you first start with Rails! Even though a lot of what you need is already installed if you are using Mac, personally I found it really hard to find come concise information on how to best go about setting things up. Since I didn't want anyone else to go through the headaches that I had when configuring their Mac development environment, I've written a 7 step guide to installing Ruby on Rails, MySQL, Apache with PHP, and phpMyAdmin on OSX Leopard. In short, everything you should need to get developing locally on your Mac!

Here's the link:

http://waavoo.com/2009/7-step-guide-installing-ruby-on-rails-mysql-apache-php-phpmyadmin-intel-mac-os-x-leopard/

Hope that helps!

i0n
Okay, this is just what I need! Unfortunately, I'm getting this error on the second part of step 4 (./configure ...):no acceptable C compiler found in $PATHAny thoughts? Thanks!
Sam
Hmm. A couple of things spring to mind.Make sure you have Xcode installed.Make sure you have set your paths correctly. (Step 3)
i0n
Wait... I reinstalled Xcode and SUCCESS! I was able to go through your guide without any trouble (except for a slight problem with phpMyAdmin... but I'm ignoring that for now)! I wonder if all of the trouble I've been having is due to a wacky installation of Xcode. I suppose I'll go back to my books now and give things another shot. Thanks again!
Sam
Great! Glad you got it going. It's a lot more fun once you're off and running!
i0n
A: 

Current versions of Rails are designed to work (for development) without needing an AMP -style stack, by using SQLite and a small Ruby Web server, so if you will only be doing Rails development you don't need to set up a stack - you can just type "rails" and it will work.

BUT the versions of RubyGems and Rails shipped with Leopard are now outdated, though, so you'll need to upgrade these before you go too far. There's an article that I wrote on setting up a Mac for development here, but the minimum commands go like this:

  1. sudo gem install rubygems-update
  2. sudo update_rubygems
  3. sudo update_rubygems (yep, twice)
  4. sudo gem update --system

These get RubyGems up to the current release, so that you can upgrade Rails safely. To do that, type:

gem update rails

The last command doesn't have sudo, because if you omit it, current versions of RubyGems will install a clean copy of the gems into your home directory, leaving the system versions untouched.

Finally, amend the .profile file in your home directory, so that the line with PATH in it says:

export PATH=$HOME/.gem/ruby/1.8/bin:$PATH

Close up any terminal windows for this to take effect. The utilities provided by the gem packages in your home directory will now have precedence over the system versions.

This means that you can type "rails" and the latest version will run, but you haven't messed with any of the software provided by Apple (apart from the system copy of RubyGems).

To upgrade your private copy of Rails whenever a new version comes along in future it's just this again:

gem update rails
Stuart Ellis
Wow... I so appreciate this write-up. Thanks! Unfortunately, I'm already stuck. Here's the response in terminal after I run your first step:ERROR: could not find gem rubygems_update locally or in a repositoryYeesh... what's going on here? Maybe the trouble I'm having is an indication of a larger issue. Any thoughts?
Sam
It's my fault, the RubyGems upgrade commands weren't quite right. I've now fixed the listing in my original post.
Stuart Ellis
A: 

BitNami RubyStack is exactly what you are looking for http://bitnami.org/stack/rubystack

Daniel Lopez