Building ruby on a separate folder

I had installed ruby throw macports but I want to update a newer version. So I build it.


iMac:~ ruby$./configure –-prefix=/opt/ruby_dir \
–-enable-shared \
–-enable-pthread \
–-enable-install-doc && make
iMac:~ ruby$sudo make install

It seems to work well, but when I have tried to use irb it breaks with the following error:


iMac:~ ricard$irb
dyld: NSLinkModule() error
dyld: Symbol not found: _rl_filename_completion_function
Referenced from: /opt/derma/lib/ruby/1.8/i686-darwin8.10.1/readline.bundle
Expected in: flat namespace

Trace/BPT trap

The solutions I have found it’s easy. Consists in build ruby –-with-readline-dir as follows:

iMac:~ ruby$./configure –-prefix=/opt/ruby_dir \
–-enable-shared \
–-enable-pthread \
–-with-readline-dir=/usr/local \
–-enable-install-doc && make
iMac:~ ruby$sudo make install

And that’s it.

Note:
To be able to use new ruby compilation in an easy way it’s a good idea to change PATH.


iMac:~ ruby$cd
iMac:~ ricard$echo '' >> .bash_login
iMac:~ ricard$echo 'export PATH="/opt/ruby_dir/bin:$PATH"' >> .bash_login

0 Responses to “Building ruby on a separate folder”


  • No Comments

Leave a Reply

Últims Twitts

Posting tweet...