ruby 1.9.1 should be configured with --program-suffix=1.9.1 if installed as ruby1.9.1

Bug #413815 reported by gleeo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ruby1.9.1 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: ruby1.9.1

The ruby 1.9.1 package made available in the karmic repository should have been built ruby with --program-suffix=1.9.1 if it is going to install ruby as ruby1.9.1. It doesn't do that however, and if, like me, you have 1.8.7 installed as well(which created a symlink from /usr/bin/ruby to /usr/bin/ruby1.8 for me) it can cause all sorts of problems with rubygems, because it thinks ruby1.9.1 is at /usr/bin/ruby, and ends up using that binary for the installation(installing for the 1.8 series instead).

Thanks.

Revision history for this message
gleeo (robert-gleeson3) wrote :

Sorry, I didn't explain myself clearly in the initial bug report.
The ruby 1.9.1 package made available in the karmic repository should have been built with --program-suffix=1.9.1 if the binary is going to be installed as '/usr/bin/ruby1.9.1' but it fails to do so.

Possible problems could be(but not limited to) the failure of rubygems to install properly.
Rubygems finds the ruby binary name from rbconfig.rb, and rbconfig.rb will point to '/usr/bin/ruby' if the --program-suffix hasn't been specified.

Revision history for this message
Lucas Nussbaum (lucas) wrote :

So a better solution would be to hack up rbconfig.rb to point to /usr/bin/ruby1.9.1, right?

Revision history for this message
gleeo (robert-gleeson3) wrote :

No, I don't see why you would do that. The best solution would be to build with "./configure --program-suffix=*extension you tend to build with with, for example, 1.9.1*" This is the best solution, let ruby do the work for you, rather then bypass what ruby has setup for you and try to hack on it yourself. And ./configure knows how rbconfig.rb should look better then either of us i would presume :-)

Revision history for this message
Lucas Nussbaum (lucas) wrote : Re: [Bug 413815] Re: ruby 1.9.1 should be configured with --program-suffix=1.9.1 if installed as ruby1.9.1

On 19/08/09 at 16:41 -0000, gleeo wrote:
> No, I don't see why you would do that. The best solution would be to
> build with "./configure --program-suffix=*extension you tend to build
> with with, for example, 1.9.1*" This is the best solution, let ruby do
> the work for you, rather then bypass what ruby has setup for you and try
> to hack on it yourself. And ./configure knows how rbconfig.rb should
> look better then either of us i would presume :-)

I don't remember exactly what was the problem with using
--program-suffix, but I remember it was doing something strange, and the
end result was not what we wanted.
--
| Lucas Nussbaum
| <email address hidden> http://www.lucas-nussbaum.net/ |
| jabber: <email address hidden> GPG: 1024D/023B3F4F |

Revision history for this message
gleeo (robert-gleeson3) wrote :

Okay, but there is a serious problem with the current installation. It needs to be fixed, if you want to try to patch rbconfig.rb then that is fine but that is a dirty hack IMO. I don't see why --program-suffix= would not work, but maybe try to address that problem? At the moment, rubygems, mkmf, will all possibly fail because they think ruby is installed as /usr/bin/ruby but it hasn't be. So either, install as /usr/bin/ruby(which may conflict with older installations), monkeypatch rbconfig.rb(dirtiest option), or get ./configure to work like it should.

Revision history for this message
Lucas Nussbaum (lucas) wrote :

Could you provide simple recipes to reproduce the problems you are
seeing, so I can test that my fix actually fixes your problems?
--
| Lucas Nussbaum
| <email address hidden> http://www.lucas-nussbaum.net/ |
| jabber: <email address hidden> GPG: 1024D/023B3F4F |

Revision history for this message
Lucas Nussbaum (lucas) wrote :

On 20/08/09 at 01:31 -0000, gleeo wrote:
> Okay, but there is a serious problem with the current installation. It
> needs to be fixed, if you want to try to patch rbconfig.rb then that is
> fine but that is a dirty hack IMO. I don't see why --program-suffix=
> would not work, but maybe try to address that problem?

FYI, I just filed http://redmine.ruby-lang.org/issues/show/1974 about that
issue.
--
| Lucas Nussbaum
| <email address hidden> http://www.lucas-nussbaum.net/ |
| jabber: <email address hidden> GPG: 1024D/023B3F4F |

Revision history for this message
Lucas Nussbaum (lucas) wrote :

Hi,

I've just uploaded a new version of the package: 1.9.1.243-1ubuntu1
Could you check that it fixes this bug?

Thank you

Revision history for this message
Lucas Nussbaum (lucas) wrote :

Since the reporter won't provide a test case, and I believe that the upload fixed the bug, I'm closing that bug report.

Changed in ruby1.9.1 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.