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
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.
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 
···
--
Posted via http://www.ruby-forum.com/\.
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
Michael Greenly wrote:
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 
Nice script. Just used it. Thanks.
···
--
Nicolas Kassis
--------------
www.nickassis.net
www.nickassis.net/blog