Forum: Ruby Upgrading Compiled Version of Ruby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B013a92b64915f94d1fe5854277ce624?d=identicon&s=25 Ben Gribaudo (Guest)
on 2006-04-06 18:38
(Received via mailing list)
Hello,

In the past, we've used Debian's package management system (apt) to
handle installing and upgrading Ruby. We're considering building Ruby
from source on our next production Web server (an Ubuntu Breezy box).

Let's say we compile Ruby ourselves. Down the road, when we want to
upgrade to another Ruby version, we'll build then run "make install" to
install the new version. When we do this, how do we make sure that any
stray files from the previous version get cleaned up?

Do you see what I'm getting at? If the current version of Ruby contains
a file called something.rb and the newer version does not, how do we
make sure that something gets deleted when we upgrade?

Thank you,
Ben
2e34f386b20cb7c11c4204d699babd78?d=identicon&s=25 Chris Alfeld (Guest)
on 2006-04-06 19:09
(Received via mailing list)
Well, this rarely happens.  Let's say that something.rb does get
removed from the ruby distribution between version X and Y.  Well, now
any ruby program written for X that has
  require 'something'
is going to break in Y.  So Y is no longer backwards compatible with
X, which is undesirable.

Second, even if it does happen, each major version of ruby has it's
own directory in <prefix>/lib/ruby, i.e., <prefix>/lib/ruby/1.8,
<prefix>/lib/ruby/1.9, etc.  So even if a file did get removed the old
file wouldn't be in the new directory.

If you're still concerened, you could always 'rm -rf
<prefix>/lib/ruby/<version>' before running make install.  Or do a
make install into a new install path and do a directory diff and then
do a make install into your real install path.

c.
A0ed1bbfe42f4f87e6db0a16706246e2?d=identicon&s=25 Michael Greenly (mgreenly)
on 2006-04-06 19:57
> Second, even if it does happen, each major version of ruby has it's
> own directory in <prefix>/lib/ruby, i.e., <prefix>/lib/ruby/1.8,
> <prefix>/lib/ruby/1.9, etc.  So even if a file did get removed the old
> file wouldn't be in the new directory.

This pretty much covers it.  I really don't ever see there being any
problems.  You could try something like http://www.encap.org/ to manage
your from source packages.

Peronally I've recently moved to building Ruby from source on Ubuntu and
have been much happier.  I did a very terse howto you can find at
http://mgreenly.metaspot.net/?p=37  I mostly recorded this so I could
refer back to it myself the next time I needed to do it ;)
280b41a88665fd8c699e83a9a25ef949?d=identicon&s=25 Stephen Waits (Guest)
on 2006-04-07 01:10
(Received via mailing list)
Michael Greenly wrote:
>
> You could try something like http://www.encap.org/ to manage
> your from source packages.

Thanks for the link!  I've had my own system for years, and it's pretty
clean, but this is great!

--Steve
A760c1a3dfb5a31e6139838a43e94089?d=identicon&s=25 Nicolas Kassis (Guest)
on 2006-04-11 17:04
(Received via mailing list)
Michael Greenly wrote:

>
>Peronally I've recently moved to building Ruby from source on Ubuntu and
>have been much happier.  I did a very terse howto you can find at
>http://mgreenly.metaspot.net/?p=37  I mostly recorded this so I could
>refer back to it myself the next time I needed to do it ;)
>
>
>
Nice script. Just used it. Thanks.
This topic is locked and can not be replied to.