Ruby 1.9 on Funtoo

134 views
Skip to first unread message

Zeno R.R. Davatz

unread,
Jul 30, 2010, 8:34:38 AM7/30/10
to Funtoo
On 26 Apr., 22:28, Peter Abrahamsen <rainh...@gmail.com> wrote:
> Fromhttp://www.gentoo.org/proj/en/prog_lang/ruby/index.xml
>
>
>
> Ruby 1.9.x: ruby19
>
> This version of Ruby is currently still masked pending resolution of
> some issues. It is available as the 1.9 slot of dev-lang/ruby. Bug
> 203706 tracks the remaining issues.
>
> In order to test Ruby 1.9 you will need to unmask the package and also
> the associated ruby_targets_ruby19 USE flag.
> <<<
>
> I wasn't able to find instructions for unmasking USE flags with a
> quick Google, but I assume it's about the same process as for
> package.unmask.

Does this help you:

mkdir -p /etc/portage/profile
echo "-ruby_targets_ruby19" >> /etc/portage/profile/use.mask
echo "dev-lang/ruby:1.9" >> /etc/portage/package.unmask
echo "dev-lang/ruby:1.9" >> /etc/portage/package.keywords
> echo 'RUBY_TARGETS="ruby18 ruby19"' >> /etc/make.conf

Let me know.

Best
Zeno

Zeno R.R. Davatz

unread,
Jul 30, 2010, 8:38:14 AM7/30/10
to Funtoo
Over at Gentoo I got this advice to install Ruby-1.9:

> It is the total of FIVE commands you have to run:
>
> mkdir -p /etc/portage/profile
> echo "-ruby_targets_ruby19" >> /etc/portage/profile/use.mask
> echo "dev-lang/ruby:1.9" >> /etc/portage/package.unmask
> echo "dev-lang/ruby:1.9" >> /etc/portage/package.keywords
>> echo 'RUBY_TARGETS="ruby18 ruby19"' >> /etc/make.conf
>
> and then install whatever you wants.

I done exactly as recommended above but it does not work.

"emerge rubygems" results in:

RubyGems installed the following executables:
/var/tmp/portage/dev-ruby/rubygems-1.3.7-r1/image/usr/bin/gem18

* Running install phase for ruby19 ...
/var/tmp/portage/dev-ruby/rubygems-1.3.7-r1/temp/environment: Zeile
2603: -rrbconfig: Kommando nicht gefunden.
/var/tmp/portage/dev-ruby/rubygems-1.3.7-r1/temp/environment: Zeile
796: setup.rb: Kommando nicht gefunden.
* ERROR: dev-ruby/rubygems-1.3.7-r1 failed:
* setup.rb install failed
*
* Call stack:
* ebuild.sh, line 47: Called src_install
* environment, line 2653: Called ruby-ng_src_install
* environment, line 2471: Called _ruby_each_implementation
'each_ruby_install'
* environment, line 281: Called _ruby_invoke_environment 'ruby19'
'each_ruby_install'
* environment, line 310: Called each_ruby_install
* environment, line 796: Called die
* The specific snippet of code:
* ${RUBY} setup.rb $myconf --destdir="${D}" || die "setup.rb
install failed";
*
* If you need support, post the output of 'emerge --info
=dev-ruby/rubygems-1.3.7-r1',
* the complete build log and the output of 'emerge -pqv
=dev-ruby/rubygems-1.3.7-r1'.
* The complete build log is located at
'/var/tmp/portage/dev-ruby/rubygems-1.3.7-r1/temp/build.log'.
* The ebuild environment file is located at
'/var/tmp/portage/dev-ruby/rubygems-1.3.7-r1/temp/environment'.
* S: '/var/tmp/portage/dev-ruby/rubygems-1.3.7-r1/work/ruby19/
rubygems-1.3.7'

Does anybody a have suggestion towards the above error?

Best
Zeno

PS: Contrary to Gentoo I believe that Ruby-1.9 deserves to be unmasked
and and made easily installable side by side with Ruby1.8 - Ruby1.9 is
more then stable and more then ready. I think the people who are ready
for Ruby-1.9 deserve to install without any hassle of unmasking and
the errors that follow that.

Zeno R.R. Davatz

unread,
Aug 4, 2010, 2:28:09 AM8/4/10
to Funtoo
Ok

dev-ruby/rubygems-1.3.7-r2

is out since yesterday.

See http://blog.flameeyes.eu/2010/08/02/hacking-is-easy for the
reason.

Also now I get a new error:

* ERROR: dev-ruby/rubygems-1.3.7-r2 failed:
* $RUBY is not set
*
* Call stack:
* ebuild.sh, line 47: Called src_install
* environment, line 2694: Called ruby-ng_src_install
* environment, line 2512: Called _ruby_each_implementation
'each_ruby_install'
* environment, line 325: Called _ruby_invoke_environment 'ruby19'
'each_ruby_install'
* environment, line 354: Called each_ruby_install
* environment, line 831: Called doruby '-r'
'gauntlet_rubygems.rb' 'rbconfig' 'rubygems' 'rubygems.rb'
'ubygems.rb'
* environment, line 812: Called die
* The specific snippet of code:
* [[ -z ${RUBY} ]] && die "\$RUBY is not set";
*
* If you need support, post the output of 'emerge --info =dev-ruby/
rubygems-1.3.7-r2',
* the complete build log and the output of 'emerge -pqv =dev-ruby/
rubygems-1.3.7-r2'.
* The complete build log is located at '/var/tmp/portage/dev-ruby/
rubygems-1.3.7-r2/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/dev-
ruby/rubygems-1.3.7-r2/temp/environment'.
* S: '/var/tmp/portage/dev-ruby/rubygems-1.3.7-r2/work/ruby19/
rubygems-1.3.7'

>>> Failed to emerge dev-ruby/rubygems-1.3.7-r2, Log file:

>>> '/var/tmp/portage/dev-ruby/rubygems-1.3.7-r2/temp/build.log'

* Messages for package dev-ruby/rubygems-1.3.7-r2:

* ERROR: dev-ruby/rubygems-1.3.7-r2 failed:
* $RUBY is not set
*
* Call stack:
* ebuild.sh, line 47: Called src_install
* environment, line 2694: Called ruby-ng_src_install
* environment, line 2512: Called _ruby_each_implementation
'each_ruby_install'
* environment, line 325: Called _ruby_invoke_environment 'ruby19'
'each_ruby_install'
* environment, line 354: Called each_ruby_install
* environment, line 831: Called doruby '-r'
'gauntlet_rubygems.rb' 'rbconfig' 'rubygems' 'rubygems.rb'
'ubygems.rb'
* environment, line 812: Called die
* The specific snippet of code:
* [[ -z ${RUBY} ]] && die "\$RUBY is not set";

any hints?

Best
Zeno

John W Higgins

unread,
Aug 6, 2010, 3:31:14 AM8/6/10
to funto...@googlegroups.com
Short answer -

ln -s ruby1.9 /usr/bin/ruby19

ruby-ng.eclass needs a version of ruby that matches the RUBY_TARGETS you want so you need a ruby19 because you have a RUBY_TARGETS of ruby19.

It's a disaster area that I can't unravel because each piece of the puzzle fights with the other. I can't figure out where the actual change makes the most sense to suggest so I'm crawling back into my gopher hole happy that I have a working environment while knowing I haven't done my part to make a long term fix. Sometimes that's just the way it works out.

John

Daniel Robbins

unread,
Aug 6, 2010, 12:20:54 PM8/6/10
to funto...@googlegroups.com

Funtoo has "/usr/bin/ruby1.9" instead of "/usr/bin/ruby19" - please
let me know if setting RUBY_TARGETS to "ruby1.9" also works around
this issue.

Regards,

Daniel

Klaus Birkelund Jensen

unread,
Aug 8, 2010, 9:32:57 PM8/8/10
to funto...@googlegroups.com
On Fri, Aug 06, 2010 at 10:20:54AM -0600, Daniel Robbins wrote:
>Funtoo has "/usr/bin/ruby1.9" instead of "/usr/bin/ruby19" - please
>let me know if setting RUBY_TARGETS to "ruby1.9" also works around
>this issue.
>

Unfortunately not. The ebuilds and the ruby-ng.eclass all depends on the
ruby19 flag.

But Funtoo could supply a patched version of ruby-ng.eclass with support
for Funtoo's different binary name. Just add a case for ruby19 in
_ruby_each_implementation() (attached patch).

--
Klaus

ruby-ng.eclass-funtoo.patch

Klaus Birkelund Jensen

unread,
Aug 9, 2010, 4:22:27 AM8/9/10
to funto...@googlegroups.com

Oh. I should finish reading all new mail before adding noise.

Sorry :)

--
Klaus

Daniel Robbins

unread,
Aug 10, 2010, 1:05:06 AM8/10/10
to funto...@googlegroups.com
On Mon, Aug 9, 2010 at 2:22 AM, Klaus Birkelund Jensen <k...@pagefault.eu> wrote:
>
> Oh. I should finish reading all new mail before adding noise.

No, it was a good patch. Now applied to the Funtoo portage tree.

In addition, I've removed the hardmask on ruby_targets_ruby19.

Regards,

Daniel

Daniel Robbins

unread,
Aug 10, 2010, 1:10:51 AM8/10/10
to funto...@googlegroups.com
On Fri, Jul 30, 2010 at 6:34 AM, Zeno R.R. Davatz <zda...@gmail.com> wrote:
>
> Does this help you:
>
> mkdir -p /etc/portage/profile
> echo "-ruby_targets_ruby19" >> /etc/portage/profile/use.mask
> echo "dev-lang/ruby:1.9" >> /etc/portage/package.unmask
> echo "dev-lang/ruby:1.9" >> /etc/portage/package.keywords
>> echo 'RUBY_TARGETS="ruby18 ruby19"' >> /etc/make.conf
>
> Let me know.

I have resolved some issues with Ruby in Funtoo, and I've updated the
FAQ on funtoo.org accordingly - the hard mask is gone so the use.mask
step is no longer needed:

What is different with Funtoo's Ruby?
-------------------------------------

Funtoo Linux tracks Gentoo's Ruby, but we do have one change for ruby-1.9
and greater - the binary name is changed with /usr/bin/ruby1.9 instead of
Gentoo's /usr/bin/ruby19. This makes the versioning consistent with Python
binaries and MacOS X. This means that for ruby-1.9 and greater. While the
path to the binary has changed, all Portage variables are the same as
Gentoo, so you should use "ruby19" for the ``RUBY_TARGETS`` setting in
``/etc/make.conf``.

Ruby 1.9 is masked. How do I use it?
------------------------------------

Add the following to /etc/make.conf::

RUBY_TARGETS="ruby19"

Then unmask ruby-1.9 as follows::

# install -d /etc/portage
# echo "dev-lang/ruby:1.9" >> /etc/portage/package.unmask

If you are using Funtoo stable, then you will also need to do this:

# echo "dev-lang/ruby:1.9" >> /etc/portage/package.keywords

Regards,

Daniel

Gene

unread,
Sep 11, 2013, 4:35:35 PM9/11/13
to funto...@googlegroups.com
Daniel Robbins <drobbins@...> writes:

> On Fri, Jul 30, 2010 at 6:34 AM, Zeno R.R. Davatz <zdavatz@...> wrote:

> Add the following to /etc/make.conf::
>
> RUBY_TARGETS="ruby19"
>
> Then unmask ruby-1.9 as follows::
>
> # install -d /etc/portage
> # echo "dev-lang/ruby:1.9" >> /etc/portage/package.unmask
>
> If you are using Funtoo stable, then you will also need to do this:
>
> # echo "dev-lang/ruby:1.9" >> /etc/portage/package.keywords
>

Adding

RUBY_TARGETS="ruby20"

just helped me build ruby on a more recent system. I did not need to unmask it.

This solution was not easy to find; ruby blocks webkit and gnome making
the whole thing was a no-go. Now we're building away.

Reply all
Reply to author
Forward
0 new messages