Ruby Forum Ruby on Rails > Ruby 1.8.5 and Readline on Mac OS X 10.4.8 (Intel)

Posted by Erik J. Barzeski (Guest)
on 04.10.2006 07:40
I've followed the hivelogic instructions 
(http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger), 
using the latest release versions of software where possible. That 
included Ruby 1.8.5 and PCRE 6.7 (and I think that's it).

I've now run into a problem I've seen discussed elsewhere - faulty 
readline support. Most of the solutions seem to point to this URL for an 
answer: 
http://www.nabble.com/Ruby-1.8.4-Mac-OS-X-readline-problems-t801880.html 
.

I'm working my way through the Agile Web Development and attempting to 
run my server (localhost:3000). I've run the "make test-all" suggested 
in the URL above, but I'm still unable to get anything to run without 
the seemingly common error:

"dyld: NSLinkModule() error
dyld: Symbol not found: _rl_filename_completion_function
  Referenced from: 
/usr/local/lib/ruby/1.8/i686-darwin8.8.1/readline.bundle
  Expected in: flat namespace"

One difference may be that I'm on a Mac Pro (thus an Intel machine).

Can anyone help? If I'm asking in the wrong place, please point me in 
the right direction. Thank you for any help you can provide.
Posted by Erik J. Barzeski (Guest)
on 04.10.2006 07:52
FWIW, I'd rather not use fink or darwinports. I read about the issues 
with readline in 1.8.4. That - and the fact that such a problem seemed 
to be so widely understood - is what led me to go with the updated 
1.8.5.

I'm running make test-all currently. It's been running for nearly 40 
minutes. I have a bunch of, well:

% make test-all
./miniruby ./runruby.rb --extout=.ext -- -C "./test" runner.rb 
--runner=console
Loaded suite .
Started
.......................................................................................E.E.E.E..................

(Periods are appearing once every few minutes after an initial burst of 
many periods.)
Posted by ryan.raaum@gmail.com (Guest)
on 04.10.2006 13:02
(Received via mailing list)
The readline "problem" on OS X has nothing to do with ruby
1.8.4/1.8.5/whatever.  The issue is that there is a partial "readline"
library in /usr/lib (libedit or something...) and that is what your
build is linking to by default (as /usr/lib comes before /usr/local/lib
in the link path).  Rrebuilding using the
--with-readline-dir=/usr/local configuration option should fix it
(assuming you have installed the true readline in /usr/local).

-r
Posted by Erik J. Barzeski (Guest)
on 04.10.2006 15:21
ryan.raaum@gmail.com wrote:
> The readline "problem" on OS X has nothing to do with ruby
> 1.8.4/1.8.5/whatever.  The issue is that there is a partial "readline"
> library in /usr/lib (libedit or something...) and that is what your
> build is linking to by default (as /usr/lib comes before /usr/local/lib
> in the link path).  Rrebuilding using the
> --with-readline-dir=/usr/local configuration option should fix it
> (assuming you have installed the true readline in /usr/local).

I don't believe that to be the case.

First, "/usr/local/bin:/usr/local/sbin" are the first two items in my 
$PATH. The Hivelogic procedure makes sure you set your path (about 100 
times), so I took care to.

Second, following the hivelogic post above, my ruby configure line 
looked like:
/configure --prefix=/usr/local --enable-pthread 
--with-readline-dir=/usr/local

I've tried both readline 5.1 and 5.0 with no success. I ran "make 
test-all" and the results are at 
http://nslog.com/archives/2006/10/04/building_ruby_rails_lighttpd_and_mysql_on_tiger.php#comments 
.

Thank you for attempting to help. Are there any other suggestions or 
ideas? I'd really like to begin learning.
Posted by Erik J. Barzeski (Guest)
on 04.10.2006 17:54
I'm fairly confident I've solved the problem:

Someone posted here: 
<http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/129980> and 
asked someone else if

ruby -rreadline -e '1'

gave an error. It did to me, so they said to go into ext/readline in the 
ruby source directory and type

ruby extconf.rb

and then the <code>make / sudo make install</code> routine. It worked! 
My local:3000 server doesn't crash and ruby on the command line works.
Posted by Snow (Guest)
on 29.01.2007 04:07
Erik J. Barzeski wrote:
> I've followed the hivelogic instructions 
> (http://hivelogic.com/articles/2005/12/01/ruby_rails_lighttpd_mysql_tiger), 
> using the latest release versions of software where possible. That 
> included Ruby 1.8.5 and PCRE 6.7 (and I think that's it).
> 
> I've now run into a problem I've seen discussed elsewhere - faulty 
> readline support. Most of the solutions seem to point to this URL for an 
> answer: 
> http://www.nabble.com/Ruby-1.8.4-Mac-OS-X-readline-problems-t801880.html 
> .
> 
> I'm working my way through the Agile Web Development and attempting to 
> run my server (localhost:3000). I've run the "make test-all" suggested 
> in the URL above, but I'm still unable to get anything to run without 
> the seemingly common error:
> 
> "dyld: NSLinkModule() error
> dyld: Symbol not found: _rl_filename_completion_function
>   Referenced from: 
> /usr/local/lib/ruby/1.8/i686-darwin8.8.1/readline.bundle
>   Expected in: flat namespace"
> 
> One difference may be that I'm on a Mac Pro (thus an Intel machine).
> 
> Can anyone help? If I'm asking in the wrong place, please point me in 
> the right direction. Thank you for any help you can provide.


I just followed the steps from 
http://www.nabble.com/Ruby-1.8.4-Mac-OS-X-readline-problems-t801880.html 
and it works. I think I built readline and ruby in that way at the very 
begin. But surprisingly rebuilding readline and ruby did work! I am 
running a mac book with intel duo core.
Posted by mj wheelwright (Guest)
on 14.02.2007 04:12
Erik J. Barzeski wrote:
> I'm fairly confident I've solved the problem:
> 
> Someone posted here: 
> <http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/129980> and 
> asked someone else if
> 
> ruby -rreadline -e '1'
> 
> gave an error. It did to me, so they said to go into ext/readline in the 
> ruby source directory and type
> 
> ruby extconf.rb
> 
> and then the <code>make / sudo make install</code> routine. It worked! 
> My local:3000 server doesn't crash and ruby on the command line works.

Thank you so much for posting this solution:

After trying numerous suggestions, this was the winner.

 Just as an addition, it might be a good idea to do this in the 
following sequence from the (ruby source directory)/ext/readline, 
especially if you've been toiling away for a bit:

#make clean
#sudo ruby extconf.rb
#make
#sudo make install

Regards
Posted by Dion Hewson (Guest)
on 14.02.2007 04:42
(Received via mailing list)
hey buddy, those instructions are two years old

try these new ones from hive this year

http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx

worked great for me

good luck

On 10/4/06, Erik J. Barzeski <rails-mailing-list@andreas-s.net> wrote:
> answer:
>   Referenced from:
>
> >
>


--
www.blogsaic.com
view, visit, vote
Posted by brant Winter (Guest)
on 03.04.2007 16:35
I was having exactly the same issue, Brand new OSX install on a G5,
10.4.9 with all updates applied. I followed the NEW Hive install guide
to the letter and ended up with this very same error we are all talking
about. I followed the /ext/readline ./ruby extconf.rb directions and it
now all works fine. Very strange ! Locomotive was such a sugar treat !


Dion Hewson wrote:
> hey buddy, those instructions are two years old
> 
> try these new ones from hive this year
> 
> http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx
> 
> worked great for me
> 
> good luck
> 
> On 10/4/06, Erik J. Barzeski <rails-mailing-list@andreas-s.net> wrote:
>> answer:
>>   Referenced from:
>>
>> >
>>
> 
> 
> --
> www.blogsaic.com
> view, visit, vote
Posted by Joseph (Guest)
on 07.04.2007 01:20
Erik J. Barzeski wrote:
> I'm fairly confident I've solved the problem:
> 
> Someone posted here: 
> <http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/129980> and 
> asked someone else if
> 
> ruby -rreadline -e '1'
> 
> gave an error. It did to me, so they said to go into ext/readline in the 
> ruby source directory and type
> 
> ruby extconf.rb
> 
> and then the <code>make / sudo make install</code> routine. It worked! 
> My local:3000 server doesn't crash and ruby on the command line works.

Brilliant, thank you.
Posted by Mick Ryan (Guest)
on 29.04.2007 02:27
Joseph wrote:
> Erik J. Barzeski wrote:
>> I'm fairly confident I've solved the problem:
>> 
>> Someone posted here: 
>> <http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/129980> and 
>> asked someone else if
>> 
>> ruby -rreadline -e '1'
>> 
>> gave an error. It did to me, so they said to go into ext/readline in the 
>> ruby source directory and type
>> 
>> ruby extconf.rb
>> 
>> and then the <code>make / sudo make install</code> routine. It worked! 
>> My local:3000 server doesn't crash and ruby on the command line works.
> 
> Brilliant, thank you.

Ive followed the hivelogic article to a T everything I thought was 
working until I ran into this error that you are all speaking of. I even 
go into irb and it give ths error
dyld: NSLinkModule() error
dyld: Symbol not found: _rl_filename_completion_function
  Referenced from: 
/usr/local/lib/ruby/site_ruby/1.8/i686-darwin8.9.1/readline.bundle
  Expected in: flat namespace

Trace/BPT trap

Ive followed the ext/readline instructions
stiill nothing.. anyone have any suggestions?

-Mick
Posted by unknown (Guest)
on 29.04.2007 04:08
(Received via mailing list)
On 4/28/07, Mick Ryan <rails-mailing-list@andreas-s.net> wrote:
>
>
> […]
>
> Ive followed the ext/readline instructions
> stiill nothing.. anyone have any suggestions?


i have always used james duncan davidson's Sandboxing Rails With
MacPortswithout issue:
  <http://blog.duncandavidson.com/2006/04/sandboxing_rail.html>

he also provides some color on install source vs. macports.

cheers,
jean-pierre