Mkmf & config question

ok so check this out:

pry(main)> require ‘mkmf’
=> true
pry(main)> CONFIG[‘sitedir’]
=> “$(libdir)/ruby/site_ruby”
pry(main)> CONFIG[‘libdir’]
=> “$(exec_prefix)/lib”
pry(main)> CONFIG[‘exec_prefix’]
=> “$(prefix)”
pry(main)> CONFIG[‘prefix’]
=> “/home/serialhex/.rvm/rubies/ruby-1.8.7-p352”
pry(main)> CONFIG[‘prefix’] = ‘/foo/bar’
=> “/foo/bar”
pry(main)> Config::expand CONFIG[‘sitedir’]
=> “/home/serialhex/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby”
pry(main)> CONFIG[‘prefix’]
=> “/foo/bar”

why when i change CONFIG[‘prefix’] to ‘/foo/bar’ does it not
change Config::expand CONFIG[‘sitedir’] to
“/foo/bar/lib/ruby/site_ruby”???
and how would i get it to do that?
hex


my blog is cooler than yours: serialhex.github.com

The wise man said: “Never argue with an idiot. They bring you down to
their
level and beat you with experience.”

Other than the fact Linux has a cool name, could someone explain why I
should use Linux over BSD?

No. That’s it. The cool name, that is. We worked very hard on
creating a name that would appeal to the majority of people, and it
certainly paid off: thousands of people are using linux just to be able
to say “OS/2? Hah. I’ve got Linux. What a cool name”. 386BSD made the
mistake of putting a lot of numbers and weird abbreviations into the
name, and is scaring away a lot of people just because it sounds too
technical.
– Linus Torvalds’ follow-up to a question about Linux

On Aug 22, 2011, at 5:49 AM, serialhex wrote:

pry(main)> CONFIG[‘prefix’]
and how would i get it to do that?
Install ruby like:

./configure --prefix=/foo/bar
make
make install

DO NOT CHANGE THE ENTRIES IN RbConfig::CONFIG, IT WILL ONLY LEAD TO
MADNESS

Please explain why you want to change the prefix of ruby so we can
answer your question properly.

On Aug 23, 2011, at 2:50 PM, serialhex wrote:

want to install the modules in another location. i think he hacked
something together but idk

RubyGems edits the generated Makefile and changes RUBYARCHDIR and
RUBYLIBDIR:

When make install is run the files will be placed in the gem’s library
directory, not ruby’s site_dir.

(Hrm, I guess I should submit a patch to mkmf.rb to allow this to be
overridden instead of this hack.)

On Tue, Aug 23, 2011 at 5:39 PM, Eric H. [email protected]
wrote:

DO NOT CHANGE THE ENTRIES IN RbConfig::CONFIG, IT WILL ONLY LEAD TO MADNESS

Please explain why you want to change the prefix of ruby so we can answer
your question properly.

'tis not i who wanted to enable this kind of madness… but a friend of
mine
with his open source project. he wants to be able to put the ruby
modules
that are generated into another dir for some reason that i don’t quite
understand… i’m guessing for different types of installs where one may
want to install the modules in another location. i think he hacked
something together but idk…
hex


my blog is cooler than yours: serialhex.github.com

The wise man said: “Never argue with an idiot. They bring you down to
their
level and beat you with experience.”

Other than the fact Linux has a cool name, could someone explain why I
should use Linux over BSD?

No. That’s it. The cool name, that is. We worked very hard on
creating a name that would appeal to the majority of people, and it
certainly paid off: thousands of people are using linux just to be able
to say “OS/2? Hah. I’ve got Linux. What a cool name”. 386BSD made the
mistake of putting a lot of numbers and weird abbreviations into the
name, and is scaring away a lot of people just because it sounds too
technical.
– Linus Torvalds’ follow-up to a question about Linux