ruby_select and rvm

David Baumgold singingwolfboy at macports.org
Wed May 19 13:08:30 PDT 2010


Is there a way to seamlessly migrate Gems written for Ruby 1.8 to Ruby
1.9? For example, the rb-twitter module seems to be written for Ruby
1.8: is there some magic invocation like

$ sudo port -d install rb-twitter ruby.implementation=ruby19

that will allow me to install that module (and its dependencies) for
Ruby 1.9? (I just tried that command, and it didn't work, as far as I
could tell.)

On Wed, May 19, 2010 at 3:54 PM, Joshua Root <jmr at macports.org> wrote:
> On 2010-5-20 04:37 , David Baumgold wrote:
>> Yeah, I've actually created a few Gem portfiles, myself. However, the
>> Ruby PortGroup seems to assume that you are installing for Ruby 1.8,
>> and I'm going to need some of the Gems for Ruby 1.9 --
>
> See the optional "implementation" parameter to ruby.setup.
>
>> The issue is that the default Macports ruby is still Ruby 1.8:
>> when I run "irb" it loads up 1.8, and I have to run "irb1.9" to load
>> up 1.9. Macports can install multiple versions of Python
>> simultaneously, and which version is called when you run "python" at
>> the terminal is controlled by the python_select port.
>
> It shouldn't be too hard to do this in much the same way using the
> select portgroup. The binaries for ruby 1.8 would of course need to be
> renamed.
>
> - Josh
>


More information about the macports-dev mailing list