开发者

RVM ruby 1.9.2 Symbol not found: _STR2CSTR

Troubleshooting RVM.

Installed both Ruby 1.9.2-Head / 1.9.2-p136

When running the server, server crashes receiving this error:

dyld: lazy symbol binding failed: Symbol not found: _STR2CSTR
Expected in: flat namespace

dyld: Symbol not found: _STR2CSTR
Expected in: flat namespace

Found this posting but didn't help much: http://www.ruby-forum.com/topic/215406

Any solutions would b开发者_开发百科e great!


I was having the same problem with Ruby 1.9.2 and the sqlite-ruby-1.2.4 gem, which is somehow required by Rails 3.0.3. This was my error message:

dyld: Symbol not found: _STR2CSTR
  Referenced from: ~/.rvm/gems/ruby-1.9.2-p136/gems/sqlite3-ruby-1.2.4/lib/sqlite3_api.bundle
Expected in: flat namespace

And I was able to fix it by going to ~/.rvm/gems/ruby-1.9.2-p136/gems/sqlite3-ruby-1.2.4/ext where the source code for the sqlite3_api.bundle was located, and replacing every occurrence of STR2CSTR by StringValuePtr as described here (first reply). I then recompiled (using make) and copied the resulting sqlite3_api.bundle to the lib/ folder.


I updated my sqlite3-ruby gem to sqlite3 Just change (in your Gemfile)

gem 'sqlite3-ruby', :require => 'sqlite3'

to

gem 'sqlite3', :require => 'sqlite3'

and run

bundle install


One of your gems (ncurses?) uses the native C API. The function STR2CSTR was removed in Ruby 1.9 So either you use the ffi-ncurses gem or you may Patch the source of the ncurses gem and recompile it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜