Does MacPort come with an alternative GCC for compiling Ruby 1.8.7 with RVM

Behrang Saeedzadeh behrangsa at gmail.com
Sat Mar 24 04:24:36 PDT 2012


Jeff,

I like the convenience of managing Rubies and Gemsets with RVM. As I work
on multiple RoR projects, each requiring a different version of Ruby and a
different set of gems, RVM helps me a lot.

Anyway, thanks to all the replies and the suggestions, I managed to install
Ruby 1.8.7 through RVM. Here are the steps:

* Install MacPorts
* Install apple-gcc-42 via MacPorts (sudo port install apple-gcc-42)
* Install RVM (looks like the latest version is broken, use an older
version instead: bash -s -- --version 1.10.2 < <(curl -s
https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ))
* Install Ruby 1.8.7 with this command: CC=/opt/local/bin/gcc-apple-4.2 rvm
install 1.8.7
* Enjoy!

Cheers,
Behrang Saeedzadeh
http://www.behrang.org


On Sat, Mar 24, 2012 at 6:13 PM, Jeff Singleton <gvibe06 at gmail.com> wrote:

> Behrang, you should know that the developers of RVM did not build RVM with
> Mac OS X in mind.  You will have to do a lot of manual configuration before
> you can get it to work the way you want it.
>
> It would be be easier to manually build Ruby in your $HOME folder, then
> just install Gems with the MacPorts paths in your environment so that
> dependencies are picked up.
>
> I had to do this for both Ruby and a threaded Perl so that I could have my
> cake and eat it to.
>
> Jeff
>
> On Sat, Mar 24, 2012 at 12:53 AM, Ryan Schmidt <ryandesign at macports.org>wrote:
>
>>
>> On Mar 24, 2012, at 00:27, Behrang Saeedzadeh wrote:
>>
>> > Also looks like the non-Apple versions of GCC are not compilable on
>> Lion anymore:
>> >
>> > sudo port install gcc42
>> > Password:
>> > --->  Fetching archive for gcc42
>> > --->  Attempting to fetch gcc42-4.2.4_2.darwin_11.x86_64.tbz2 from
>> http://packages.macports.org/gcc42
>> > --->  Fetching gcc42
>> > Error: gcc42 does not build on Snow Leopard or later.
>> > Error: Target org.macports.fetch returned: unsupported platform
>> > Log for gcc42 is at:
>> /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc42/gcc42/main.log
>> > Error: Status 1 encountered during processing.
>> > To report a bug, see <http://guide.macports.org/#project.tickets>
>>
>> Certainly not something as ancient as gcc42. Newer ones should work
>> though.
>>
>>
>> _______________________________________________
>> macports-users mailing list
>> macports-users at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20120324/a1fe3289/attachment.html>


More information about the macports-users mailing list