Forum: Ruby on Rails Can't Install Rails with Ruby Gem Dependencies, OS X

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
04ce0d4a570beafdbd92d075e4f4f7fb?d=identicon&s=25 Trevor Pierce (1copenut)
on 2006-05-10 15:29
Hello Community:

I'm a brand new user of Ruby on Rails, and am having a great deal of
trouble compiling from source. I'm using the tutorial at
http://hivelogic.com/articles/2005/12/01/ruby_rail...
to complete the install.

Readline and Ruby installed just fine, and the Ruby Gems appeared to.
But when I tried to sudo gem install Rails --include-dependencies, I got
the following error:

sudo: gem: command not found

I tried to move on and install the Fast CGI with bindings, with the same
error. I Googled and searched for an answer most of the night, without
avail.

I'm running Mac OS X Tiger 10.4.6, and am using File Vault on my home
directory, which hasn't been a problem for builds in the past.

Any information that could be passed along would be much appreciated.
I'm anxious to use Ruby on Rails, but can't get it running.

Thank you.
00b25ade726ce4fb538d3d8cf47a750b?d=identicon&s=25 Harvey Bernstein (Guest)
on 2006-05-10 15:35
(Received via mailing list)
Trevor

I can't help you with your particular problem as such.  However, can I
suggest you have at look at Locomotive,
http://locomotive.raaum.org/home/show/HomePage

Ryan Raaum has done an absolutely fantastic job with Locomotive.

Good luck.
Harvey

On 10/5/06 14:29, "Trevor Pierce" <pierce.trevor@gmail.com> wrote:

>
> I'm anxious to use Ruby on Rails, but can't get it running.
>
> Thank you.


This e-mail has been scanned for all viruses by MessageLabs.
04ce0d4a570beafdbd92d075e4f4f7fb?d=identicon&s=25 Trevor Pierce (1copenut)
on 2006-05-10 16:18
Could it be that I didn't install the fixrbconfig gem? I'm reading
elsewhere that it's the source of a lot of grief.
176a68c9a14f0706e10f6538155cfa4e?d=identicon&s=25 Jon Hinckley (jbhruby)
on 2006-05-10 16:40
Trevor Pierce wrote:
> Hello Community:
>
> I'm a brand new user of Ruby on Rails, and am having a great deal of
> trouble compiling from source. I'm using the tutorial at
> http://hivelogic.com/articles/2005/12/01/ruby_rail...
> to complete the install.
>
> Readline and Ruby installed just fine, and the Ruby Gems appeared to.
> But when I tried to sudo gem install Rails --include-dependencies, I got
> the following error:
>
> sudo: gem: command not found
>
> I tried to move on and install the Fast CGI with bindings, with the same
> error. I Googled and searched for an answer most of the night, without
> avail.
>
> I'm running Mac OS X Tiger 10.4.6, and am using File Vault on my home
> directory, which hasn't been a problem for builds in the past.
>
> Any information that could be passed along would be much appreciated.
> I'm anxious to use Ruby on Rails, but can't get it running.
>
> Thank you.


I read somewhere that the default installation of ruby on Mac OS X has
some problems. There's a great article at
http://hivelogic.com/articles/2005/12/01/ruby_rail...
that covers ruby, rails, lighttpd etc installation on the Mac. I'm
currently waiting to upgrade my ibook G3 before using a mac for ROR
development. I'm currently developing on a Linux box.

Hope this helps,

Jon
176a68c9a14f0706e10f6538155cfa4e?d=identicon&s=25 Jon Hinckley (jbhruby)
on 2006-05-10 16:43
Jon Hinckley wrote:

>
> I read somewhere that the default installation of ruby on Mac OS X has
> some problems. There's a great article at
> http://hivelogic.com/articles/2005/12/01/ruby_rail...
> that covers ruby, rails, lighttpd etc installation on the Mac. I'm
> currently waiting to upgrade my ibook G3 before using a mac for ROR
> development. I'm currently developing on a Linux box.
>
> Hope this helps,
>
> Jon


Sorry I should have read your posing a little closer. You've already
seen the hive logic article.
Cfda8d3a956b6bf4b73f8fc2132da051?d=identicon&s=25 Kenneth Liu (Guest)
on 2006-05-10 17:21
(Received via mailing list)
Trevor,

If you're eager to get going quickly, skip compiling from source and
just get Locomotive.  It comes with everything you'll need to get
started with Rails.  Then install XAMPP for OS X
(http://www.apachefriends.org/en/xampp.html) to get mysql and
phpmyadmin.

Shouldn't take more than 10 minutes to get going.

The only trouble I ran into was pointing Rails at the xampp mysql socket
file, add:

  socket: /Applications/xampp/xamppfiles/var/mysql/mysql.sock

to your database.yml and you'll be set.

Ken
E28c35323f624b8b9ed8712e25105454?d=identicon&s=25 Ray Baxter (Guest)
on 2006-05-10 18:01
(Received via mailing list)
Trevor Pierce wrote:

> Readline and Ruby installed just fine, and the Ruby Gems appeared to.
> But when I tried to sudo gem install Rails --include-dependencies, I got
> the following error:
>
> sudo: gem: command not found

gem is not on your path.

Either the gem install did not succeed, or it succeeded in installing
gem somewhere that is not in your PATH.

--

Ray
2e18231ab86ae81324b23c279b3b338e?d=identicon&s=25 Allison Newman (demallien)
on 2006-05-10 21:56
Hi,
I did the install on my Mac a couple of weeks ago, using the same
tutorial, and ran into quite a few problems...

I can't remember exactly what I did to fix it, but I remember the first
step: I googled the exact text of the error message that you get.  Lots
of people have had the same problem, and there were quite a few good
links to sort the problem out.  From memory though, your problem was
actually during the gems install.  Go back and try that step again to
get the error message.  then do the search on Google.  the redo the
installation of gems.

Other tricks for young players, when the Universal Binaries version of
Tiger was released, the Ruby libs were moved from
/usr/lib/ruby/1.8/ppc-darwin8.0 to
/usr/lib/ruby/1.8/universal-darwin8.0.  if you do a search on Google for
the path you should find the answer, for example, on this site :
http://wiki.rubyonrails.com/rails/pages/HowtoUseSQLite

there is this:
"There are several possible reasons; if you donâ??t have Xcode installed
the ruby.h header file wonâ??t be found. If you have Xcode 2.2 on Tiger
10.4.3 youâ??ll find the ruby.h header file has moved from
/usr/lib/ruby/1.8/powerpc-darwin8.0/ruby.h to
/usr/lib/ruby/1.8/universal-darwin8.0/ruby.h. As a result it isnâ??t being
found by gem. Some people have found symlinks fix the problem, but many
readers of comp.lang.ruby advocate installing ruby from source as the
install of ruby that comes with Tiger is deemed to be slightly broken"

Anyway, I hope that helps...
6a28ba6ec44cf691eb4f4d7d40e094e5?d=identicon&s=25 Craig Demyanovich (Guest)
on 2006-05-11 05:47
(Received via mailing list)
I recently used James Duncan Davidson's "Sandboxing Rails with Darwin
Ports," [http://duncandavidson.com/essay/2006/04/portsandbox]. I was
already using DarwinPorts anyway, so this worked really well for me.
The overall process took quite some time due to all the compiling,
but it was worth it. Package managers are the way to go if you're
going to be compiling from source. Who wants to chase down
dependencies when installing or upgrading? Let the package manager
(whichever you might use) do it for you.

Craig
6a28ba6ec44cf691eb4f4d7d40e094e5?d=identicon&s=25 Craig Demyanovich (Guest)
on 2006-05-11 05:50
(Received via mailing list)
Heh. Mail in Mac OS X doesn't handle that URL well; it adds the
trailing ']' by mistake.

Here it is again for convenience:

http://duncandavidson.com/essay/2006/04/portsandbox

Craig
04ce0d4a570beafdbd92d075e4f4f7fb?d=identicon&s=25 Trevor Pierce (1copenut)
on 2006-05-11 16:05
To everyone who's submitted to this thread:

Thank you for your time and energy in helping me solve this problem. And
as per my programming usual, the real problem was me.

In the past I had (unknowingly at this time) edited ~/.bash_profile to
make the PATH /usr/local/mysql, which caused me all kinds of problems
with gems.

I've since learned how to echo the PATH using basic UNIX commands and
have changed it. The install is going smoothly and taking forever, but
Ruby on Rails will be running shortly.

For anyone interested, I would say check the following files, in this
order, before compiling anything from source that expects a specific
path.

~/.bash_login
~/.bash_profile
~/.profile

These files all have a hand in the UNIX PATH and setting a new path on
one doesn't necessarily trump the previous one. Once you've set the path
you want, run echo $PATH from the command line to see if it's what you
want.

This is probably common knowledge to most, and would have been the
course of action to solve my problem, but if it spares one person some
grief, then it's worth hearing again.

Thank you,

Trevor
This topic is locked and can not be replied to.