Need help installing Rails 3 on non-Intel Mac

I’m having trouble installing Rails 3 (on a Mac Powerbook G4 running
OSX 10.5.8). Specifically, when I try “gem install rails --pre” it
says:

ERROR: Error installing rails:
activesupport requires Ruby version >= 1.8.7.

But, if I do “ruby --version”, it says “ruby 1.8.7 (2010-06-23
patchlevel 299) [powerpc-darwin9]”.

??? Maybe I’m not counting on enough fingers, but it seems to me like
1.8.7 (what I have) is indeed >= (greater than or equal to) 1.8.7
(what activesupport wants).

I thought it might have been getting confused because I got 1.8.7 via
ports (which BTW required in turn an upgrade of XCode, AND took hours
to download and build), so that was in /opt/local/bin, while
/usr/bin/ruby was a symlink to
…/…/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby.
So I moved /usr/bin/ruby to ruby.old, and pointed a new ruby link to
the one in /opt/local/bin. Still no go.

I suspect that gem is looking directly into
/System/Library/Frameworks/blah/blah/blah, so I tried to google how to
move the ports one into place and the structure of a correct Mac
framework, and Ruby in particular, but didn’t get anything useful
(i.e., that I felt I could grok in sufficient fullness).

I thought it might be looking at lib files, so I tried moving
/usr/local/lib/ruby to ruby.old and making a symlink named ruby, to
/opt/local/lib/ruby. Same result.

Next step was to download (svn co), build, and install MacRuby 0.6,
leapfrogging up to Ruby 1.9. Or at least try to – rake says:

You appear to be using a PowerPC machine. MacRuby’s primary
architectures are Intel 32-bit and 64-bit (i386 and x86_64).
Consequently, PowerPC support may be lacking some features.
The llvm-config executable was not located as
/usr/local/bin/llvm-config. Please make sure LLVM is correctly
installed on your machine and pass the llvm_config option to rake if
necessary.

I was about to try installing llvm, but I’m sick of shaving yaks, and
starting to get the impression I’m doin’ it wrong.

Is there indeed an easier way to get Rails 3 onto a non-Intel Mac?
Could the problems maybe have something to do with the fact that I
already have a prior version of Rails (2.3.8) installed? (Or does
someone have an Intel-based Mac they’d like to donate?)

Thanks,
Dave


Specialization is for insects. -RAH | Have Pun, Will Babble! -me
Programming Blog: http://codosaur.us | Work: http://davearonson.com
Leadership Blog: http://dare2xl.com | Play: http://davearonson.net

On Sun, Jul 25, 2010 at 2:13 PM, Dave A.
[email protected] wrote:

I’m having trouble installing Rails 3 (on a Mac Powerbook G4 running
OSX 10.5.8). Specifically, when I try “gem install rails --pre” it
says:

ERROR: Error installing rails:
activesupport requires Ruby version >= 1.8.7.

But, if I do “ruby --version”, it says “ruby 1.8.7 (2010-06-23
patchlevel 299) [powerpc-darwin9]”.

I thought it might have been getting confused because I got 1.8.7 via
ports (which BTW required in turn an upgrade of XCode, AND took hours
to download and build), so that was in /opt/local/bin, while
/usr/bin/ruby was a symlink to
…/…/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby.

Multiple ruby executables – maybe multiple gem executables too?
What does gem env say?


Hassan S. ------------------------ [email protected]
twitter: @hassan

On Sun, Jul 25, 2010 at 17:32, Hassan S.
[email protected] wrote:

Multiple ruby executables – maybe multiple gem executables too?
What does gem env say?

Hmmm, I think you’re on the right path. It says:

RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.7
  • RUBY VERSION: 1.8.6 (2009-06-08 patchlevel 369)
    [universal-darwin9.0]
  • INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  • RUBY EXECUTABLE:
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  • EXECUTABLE DIRECTORY: /usr/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • universal-darwin-9
  • GEM PATHS:
    • /Library/Ruby/Gems/1.8
    • /Users/dave/.gem/ruby/1.8

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8

  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

Looks like I need to get more familiar with the intricacies of the
Ruby “ecosystem”, such as how to tell gem, not (just) OSX, that my
Ruby “stuff” is over in /opt. (Unless of course gem is simply
reporting what OSX tells it.) I’ll google, and check manpages, and
see what I can figure out… but in the meantime, if anybody’s
inclined to speak up… :slight_smile:

Thanks,
Dave


Specialization is for insects. -RAH | Have Pun, Will Babble! -me
Programming Blog: http://codosaur.us | Work: http://davearonson.com
Leadership Blog: http://dare2xl.com | Play: http://davearonson.net

“MacPorts is the Devil” http://github.com/maddox/magick-installer

About a month ago I succeeded in getting rails3 working on a G4
MacMini after upgrading to 10.5.8 from 10.4.?.

There where problems and most of them revolved around MacPorts. I
installed rubygems using MacPorts and dependencies would start looking
for stuff in /usr/local and blow up. I finally just took /opt/local
out of the picture and used /library/ruby for gems and /usr/local for
all other stuff (compile from source on installer using with something
using /usr/local).

While not as bad, I also had problems with RVM - but it might have
just been my usage. The G4 is more or less my productions server and
was running a couple applications I moveed from 2.x (actually one from
1.x) to rails3beta4.

I’ll agree with “maddox”, MacPorts is the Devil.

Steve A.

On Jul 25, 5:20 pm, Hassan S. [email protected]

On Sun, Jul 25, 2010 at 3:12 PM, Dave A.
[email protected] wrote:

RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.7
  • RUBY VERSION: 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]
  • INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  • RUBY EXECUTABLE:
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  • EXECUTABLE DIRECTORY: /usr/bin

Yep, look around to see if you have another gem; you may be using
/usr/bin/gem by default, but your ports ruby has another one at e.g.
/usr/local/bin/gem or /opt/local/bin/gem.

If so, you just need to change your PATH to pick that up first.

HTH,

Hassan S. ------------------------ [email protected]
twitter: @hassan

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