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

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3a525210ef3067b28fcf28c1837fced8?d=identicon&s=25 Erik J. Barzeski (Guest)
on 2006-10-04 07:40
I've followed the hivelogic instructions
(http://hivelogic.com/articles/2005/12/01/ruby_rail...),
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...
.

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.
3a525210ef3067b28fcf28c1837fced8?d=identicon&s=25 Erik J. Barzeski (Guest)
on 2006-10-04 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.)
F9646277392b8d8d718ef457696a0423?d=identicon&s=25 ryan.raaum@gmail.com (Guest)
on 2006-10-04 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
3a525210ef3067b28fcf28c1837fced8?d=identicon&s=25 Erik J. Barzeski (Guest)
on 2006-10-04 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...
.

Thank you for attempting to help. Are there any other suggestions or
ideas? I'd really like to begin learning.
3a525210ef3067b28fcf28c1837fced8?d=identicon&s=25 Erik J. Barzeski (Guest)
on 2006-10-04 17:54
I'm fairly confident I've solved the problem:

Someone posted here:
<http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/... 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.
C9cc2a83daacca6f9acf9bb1cc57bba6?d=identicon&s=25 Snow (Guest)
on 2007-01-29 04:07
Erik J. Barzeski wrote:
> I've followed the hivelogic instructions
> (http://hivelogic.com/articles/2005/12/01/ruby_rail...),
> 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...
> .
>
> 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...
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.
98bae2c46d339cfb90bee84a708da079?d=identicon&s=25 mj wheelwright (Guest)
on 2007-02-14 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/... 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
Adebae130af75724f0296ff49958d6fb?d=identicon&s=25 Dion Hewson (Guest)
on 2007-02-14 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...

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
21a2f68abf447c1240a68aee3e04266b?d=identicon&s=25 brant Winter (Guest)
on 2007-04-03 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...
>
> 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
B9965914922befc565887c3dbb77e03e?d=identicon&s=25 Joseph (Guest)
on 2007-04-07 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/... 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.
Cd0cc60bc3632816b5562c1419683c9e?d=identicon&s=25 Mick Ryan (Guest)
on 2007-04-29 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/... 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
Af72b502d277ea86637ba12c5056ec68?d=identicon&s=25 unknown (Guest)
on 2007-04-29 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_...

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

cheers,
jean-pierre
This topic is locked and can not be replied to.