Ruby 1.8.7 on MacPorts causing some problems
11 comments Latest by gourmet food Fri, 03 Oct 2008 16:31:26 GMT
It appears that MacPorts has upgraded to Ruby 1.8.7, which is good news if you’re running Rails 2.1… but if you have an older Rails application… it’s not going to work too well.
In order to get Ruby 1.8.6 installed with the latest MacPorts, you’ll need to do the following.
$ mkdir /Users/Shared/dports
$ svn checkout -r 36429 \
http://svn.macports.org/repository/macports/trunk/dports/lang/ruby/ \
/Users/Shared/dports/lang/ruby/
Then you’ll need to modify your macports to use this new local source. You’ll need to edit /opt/local/etc/macports/sources.conf and add the following line above the existing rsync record.
file:///Users/Shared/dports and create that directory
Next, you’ll want to index this new local source with the following command:
portindex /Users/Shared/dports
After that, you can do the following.
sudo port uninstall rb-rubygems ruby
sudo port clean rb-rubygems ruby
sudo rm -r /opt/local/lib/ruby/gems/1.8/doc/rubygems-1.1.1/
sudo port deactivate autoconf
sudo port install ruby rb-rubygems
..and hopefully you’ll have Ruby 1.8.6 installed and be able to retain the rubygems you installed already.
Enjoying the content? Be sure to subscribe to my RSS feed.




I dealt with the same problem on debian. Here is my little how to for debian users:
http://dev.hubiquity.fr/2008/6/3/avoid-rails-troubles-with-ruby-1-8-7-under-debian
david
Use this Portfile http://pastie.org/220010 to get Ruby 1.8.6-p230.
Thanks for the note. We have some small Rails 2.0.x projects which seem to be working fine on Ruby 1.8.7, but there’s definitely some bustedness going on with TestUnit. Exceptions… everywhere :(
Thanks. I ended up giving up on Macports due to the problems with Ruby 1.8.7.
Btw, Robby, is something up with your feed? In Newsfire (my RSS reader), I get nothing, and sometimes when I go to your feed url, no posts are shown.
I ended up too, thank you!
me too
Fantastic—these instructions worked like a charm.
Plagiarism! http://journal.bitshaker.com/articles/2007/10/20/install-old-versions-of-ports-using-macports/
This is exactly what I am looking for today, but I am running into a fetch problem on OS X 10.4.11:
chip-castles-powerbook-g4-17:/opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/ruby deploy$ sudo port install rb-rubygems ruby -> Fetching ruby -> Attempting to fetch ruby-1.8.6-p114.tar.gz from http://www.ibiblio.org/pub/languages/ruby/1.8 -> Attempting to fetch ruby-1.8.6-p114.tar.gz from http://mirrors.sunsite.dk/ruby/1.8 -> Attempting to fetch ruby-1.8.6-p114.tar.gz from ftp://xyz.lcs.mit.edu/pub/ruby/1.8 -> Attempting to fetch ruby-1.8.6-p114.tar.gz from ftp://ftp.iij.ad.jp/pub/lang/ruby/1.8 -> Attempting to fetch ruby-1.8.6-p114.tar.gz from ftp://ftp.ruby-lang.org/pub/ruby/1.8 -> Attempting to fetch ruby-1.8.6-p114.tar.gz from ftp://ftp.fu-berlin.de/unix/languages/ruby/1.8 -> Attempting to fetch ruby-1.8.6-p114.tar.gz from ftp://ftp.easynet.be/ruby/ruby/1.8 -> Attempting to fetch ruby-1.8.6-p114.tar.gz from ftp://ftp.ntua.gr/pub/lang/ruby/1.8 -> Attempting to fetch ruby-1.8.6-p114.tar.gz from ftp://ftp.chg.ru/pub/lang/ruby/1.8 -> Attempting to fetch ruby-1.8.6-p114.tar.gz from ftp://ftp.kr.FreeBSD.org/pub/ruby/1.8 -> Attempting to fetch ruby-1.8.6-p114.tar.gz from ftp://ftp.iDaemons.org/pub/mirror/ftp.ruby-lang.org/ruby/1.8 -> Attempting to fetch ruby-1.8.6-p114.tar.gz from http://svn.macports.org/repository/macports/distfiles/ruby -> Attempting to fetch ruby-1.8.6-p114.tar.gz from http://svn.macports.org/repository/macports/distfiles/general/ -> Attempting to fetch ruby-1.8.6-p114.tar.gz from http://svn.macports.org/repository/macports/downloads/ruby Error: Target org.macports.fetch returned: fetch failed Error: The following dependencies failed to build: ruby Error: Status 1 encountered during processing.
Any suggestions for fixing this fetch issue?
Thanks!
because without the @ it tried to install 1.8.7 anyway
I did not work in the end. But I know why: not enough coffee!
I copied all the line “file:///Users/Shared/dports and create that directory”
You should at a line break to your instructions my friend.
thanks!