开发者

Error running a Rails app in RVM: 'Could not open library'

开发者 https://www.devze.com 2023-03-24 04:37 出处:网络
Under 10.4.11, ruby-1.9.2-p290 and RVM I\'ve just installed gems from an app\'s gemfile, but on running the server I get the following (a search only yields two similar questions, both unanswered), so

Under 10.4.11, ruby-1.9.2-p290 and RVM I've just installed gems from an app's gemfile, but on running the server I get the following (a search only yields two similar questions, both unanswered), so even hints are welcome:

$ rails server
/Users/deveritt/.rvm/gems/ruby-1.9.2-p290/gems/ffi-1.0.9/lib/ffi/library.rb:75:in `block in ffi_lib': Could not open library 'libmagic.1.dylib': dlopen(libmagic.1.dylib, 5): image not found. Could not open library 'libmagic.so.1': dlopen(libmagic.so.1, 5): image not found. Could not open library 'libmagic.so.1.dylib': dlopen(l开发者_开发百科ibmagic.so.1.dylib, 5): image not found. Could not open library 'magic1.dll': dlopen(magic1.dll, 5): image not found. Could not open library 'libmagic1.dll.dylib': dlopen(libmagic1.dll.dylib, 5): image not found (LoadError)
        from /Users/deveritt/.rvm/gems/ruby-1.9.2-p290/gems/ffi-1.0.9/lib/ffi/library.rb:54:in `map'
        from /Users/deveritt/.rvm/gems/ruby-1.9.2-p290/gems/ffi-[SNIP]

3.0.6/lib/rails/commands.rb:27:in <top (required)>' from script/rails:6:inrequire' from script/rails:6:in `'

Is this familiar to anyone?

Update: found a Homebrew install just for libmagic that avoids the horrendous ImageMagick install, adapted it for a straight install without brew (YMMV):

get the file:

curl -O 'ftp://ftp.astron.com/pub/file/file-5.04.tar.gz'

Unzip etc. (or double-click) and move the resulting folder to /tmp, then ./configure, make and sudo make install as usual (see the file INSTALL if not sure). After this, RoR launched.

0

精彩评论

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