Installing Rails on Leopard

The installation process for Rails has 3 steps:

  1. Install the Apple Developer Tools (Xcode) found on the Mac OS X
    installation disk or downloaded from the Apple Developer Connection
    downloads page.

  2. Download and install MacPorts (formerly DarwinPorts). This tool
    greatly simplifies the installation of Ruby on Rails and can be later
    used to update or remove Rails. MacPorts can be installed from a
    familiar disk image file.

  3. Open the Terminal application and type the following command,
    followed by the return key. It will most likely prompt you to enter
    your password.

sudo port install ruby

Steps 1 & 2 are easy enough: Xcode and MacPorts installs without
problem. However, when I enter the command: sudo port install ruby I
get an error:

sudo: port: command not found

It seems the path is not being set.

If anyone know a quick fix for this I would appreciate it. I am not
very familiar with the “under the hood” stuff on the Mac.

Ruby, Rails, SQLite-3 and Subversion are all installed on Leopard by
default.

Is there a reason you’re not using these?

On Feb 6, 2008 5:49 PM, Daniel W. [email protected]
wrote:

Ruby, Rails, SQLite-3 and Subversion are all installed on Leopard by
default.

Is there a reason you’re not using these?

I can’t speak for the OP, and I’m a Mac newbie myself, so I’m answering
your
question as a request for education rather than any assertion of wisdom
on
my part… here’s the reason I use the macports version:

[email protected]:~$ /usr/bin/rails --version
Rails 1.2.6
[email protected]:~$ /opt/local/bin/rails --version
Rails 2.0.2

I would happily standardize if this is considered better; is there a way
to
upgrade Leopard’s Rails?

byronbay: If you’re as much of a newbie as I am, it may be something as
simple as needing to restart Terminal before the new path will be picked
up
by bash.

David


David B.
[email protected]
For every problem there is a solution that is simple, neat, and wrong.

H.L. Mencken

Hi David

I gave up developing in RonR a year ago out of sheer frustration at
the lack of decent manuals, any support (except for the exceptional
ryanb on the Rails forum at http://railsforum.com/). Its not a good
sign that the Rails community hasn’t updated their installation
instructions for Leopard as yet…

Anyway, I have to persevere - I am hoping it will not be so
frustrating an experience this time around.

/stephen

Simple reason is that I had no idea it was installed already. Why
would I? The official Rails site makes no mention of it and so I
tried to follow their installation instructions for Mac OS X. Surely
Leopard has been out long enough for the Rails guys to have updated
the site… Their instructions are, in any case, missing some
important steps AND they point to Locomotive which, according to the
author, is no longer being developed because RonR is preinstalled on
Leopard…

… which was a rather circuitous path to find I had just wasted a
morning. I could say lots of unpleasant things at this stage about
the open-source environment… but then that would just be because my
time is important to me and i hate wasting it…

On Feb 7, 11:49 am, Daniel W. [email protected]

I posted this article a few weeks ago that walks you through the
entire process.

Enjoy!

You have to add the ports bin/sbin paths to your PATH variable. Open/
create a file called .profile in your home directory. The add this:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

You can then either type this: source ~/.profile or logout and log
back in again…

Matt

sorry byronbay, but a little “rails leopard” in google would have
saved your morning

It would be great if someone would post this link on the official
Rails site so I can stop repeating myself.

Here is the “official” site for Ruby on Mac OS X Leopard:
http://ruby.macosforge.org/

And there’s a nice FAQ here:
http://trac.macosforge.org/projects/ruby/wiki/FAQ

Read and all your questions will answered (well most anyway).

I’ve build rails on my Mac Tiger a few months ago using the following:
http://hivelogic.com/articles/ruby-rails-mongrel-mysql-osx/
I am about to buy a new Mac which I guess will come with Leopard.

If I want my local environment to include MySQL, Subversion and
Mongrel, should I use the post by hivelogic or should I use Mac Ports?
What would you recommend?

  • Elle

David B. wrote:

I would happily standardize if this is considered better; is there a way
to upgrade Leopard’s Rails?

sudo gem install rails --include-dependencies

On 08 Feb 2008, at 08:05, Daniel W. wrote:

David B. wrote:

I would happily standardize if this is considered better; is there
a way
to upgrade Leopard’s Rails?

sudo gem install rails --include-dependencies

The latest gem version defaults to the --include-dependencies (or -y)
parameter iirc, you don’t need to add it anymore. (sudo gem update –
system)

Best regards

Peter De Berdt

Peter De Berdt wrote:

On 08 Feb 2008, at 08:05, Daniel W. wrote:

David B. wrote:

I would happily standardize if this is considered better; is there
a way
to upgrade Leopard’s Rails?

sudo gem install rails --include-dependencies

The latest gem version defaults to the --include-dependencies (or -y)
parameter iirc, you don’t need to add it anymore. (sudo gem update –
system)

Sweet! Good to know. Thanks for the heads up.

I’ve seen the -y flag and thought that might be what it’s for, but last
I saw a post on Riding Rails on how to get the latest version of Rails
they used --include-dependencies.

On 08 Feb 2008, at 10:21, Daniel W. wrote:

I’ve seen the -y flag and thought that might be what it’s for, but
last
I saw a post on Riding Rails on how to get the latest version of Rails
they used --include-dependencies.

-y is just a short version of --include-dependencies, just like it’s
fairly common to be able to use -v and --version to get an app version.

Best regards

Peter De Berdt

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs