Ruby headers?

nox n.oxyde at gmail.com
Mon May 11 12:50:12 PDT 2009


Le 11 mai 09 à 20:23, Darren Weber a écrit :

>
>   ruby -r rbconfig -e 'puts Config::CONFIG["archdir"]'
>
> So if you write a build script you might want to reference
> it using this variable, to make it usable on systems other
> the your current one.
>
> Florian
>
>
> How do you wrap this in tcl for macports?  I've tried all of the  
> following:
>
> % exec ruby -r rbconfig -e 'puts Config::CONFIG["archdir"]'
> invalid command name "archdir"
> % exec "ruby -r rbconfig -e 'puts Config::CONFIG["archdir"]'"
> invalid command name "archdir"
> % exec "ruby -r rbconfig -e 'puts Config::CONFIG[\"archdir\"]'"
> invalid command name ""archdir""
> % exec ruby -r rbconfig -e 'puts Config::CONFIG[\"archdir\"]'
> invalid command name ""archdir""
> % exec ruby -r rbconfig -e 'puts Config::CONFIG[\'archdir\']'
> invalid command name "'archdir'"
> % exec ruby -r rbconfig -e 'puts Config::CONFIG[archdir]'
> invalid command name "archdir"
> % exec ruby -r rbconfig -e 'puts Config::CONFIG\[archdir\]'
> -e:1: unterminated string meets end of file
> % exec ruby -r rbconfig -e 'puts Config::CONFIG\[\"archdir\"\]'
> -e:1: unterminated string meets end of file
> % exec "ruby -r rbconfig -e 'puts Config::CONFIG\[\"archdir\"\]'"
> couldn't execute "ruby -r rbconfig -e 'puts  
> Config::CONFIG["archdir"]'": no such file or directory
>

try this:
exec ruby -r rbconfig -e {puts Config::CONFIG["archdir"]}



More information about the macports-dev mailing list