在Mac Snow Leopard上遇到遏制宝石问题 [英] Having Issues with Curb gem on Mac Snow Leopard

查看:134
本文介绍了在Mac Snow Leopard上遇到遏制宝石问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在控制台中运行:require'curb'



我得到的错误:

  LoadError:dlopen(/usr/local/lib/ruby/gems/1.8/gems/taf2 -curb-0.5.4.0 / lib / curb_core.bundle,9):找不到合适的图像。找到:

/usr/local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb_core.bundle:mach-o,但是架构错误 - / usr /local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb_core.bundle
from /usr/local/lib/ruby/gems/1.8/gems/taf2-curb- 0.5.4.0/lib/curb_core.bundle $ / b / b /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in`require'
from / Users / user / Sites /CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in`require'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb :521:在`new_constants_in'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in`require'$ b $ from / usr / local /lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb.rb:1
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 36:在`gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in`require'
from / U sers / user / Sites / CSG / vendor / rails / activesupport / lib / active_support / dependencies.rb:156:在'require'
从/ Users / user / Sites / CSG / vendor / rails / activesupport / lib / active_support / dependencies.rb:521:在`new_constants_in'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in`require'
from ./lib/tokbox/base_api.rb:7

我尝试卸载gem并重新安装ARCHFLAGS = - arch i386的版本数
在安装中没有提供错误或警告
当我尝试安装时:rake install
我也遇到了这个错误。 p>

我正在使用ruby 1.8的mac ox 10.6我注意到有libcurl.4.dylib,libcurl .3.dylib和libcurl.2.dlib以及libcurl.dylib放在我的/ usr / lib文件夹中......



我安装了最新的7.20 curl软件包。



我试图从源代码安装,并得到这个错误




/用户/用户/下载/ taf2-curb-ac0b465 /Downloads/taf2-curb-ac0b465/ext/curb_core.bundle:dlopen(/Users/user/Downloads/taf2-curb-ac0b465/ext/curb_core.bundle,9):找不到合适的图像。找不到:(LoadError)
/Users/user/Downloads/taf2-curb-ac0b465/ext/curb_core.bundle:mach-o,但是架构错误 - / Users / user / Downloads / taf2-curb-ac0b465 / ext / curb_core.bundle
from / Users / user / Downloads / helper.rb:12:在'require'
from /Users/user/Downloads/taf2-curb-ac0b465/tests/helper.rb:12
from ./tests/tc_curl_download.rb:1:从/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader的`require'
./tests/tc_curl_download.rb:1
。 rb:5:在`load'中$ / $ / b / b /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5 $ b $ from / usr /local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in从/usr/local/lib/ruby/gems/1.8开始的每个
/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
rake中止!
命令失败,状态为(1):[/ usr / local / bin / ruby​​ -Ilib/ usr / local / li ...]

建议?

解决方案

试试:



pre $ sudo env ARCHFLAGS = - arch x86_64gem install curb

为我工作。


This has consumed hours of my time.

in the console i run: require 'curb'

i get the error:

LoadError: dlopen(/usr/local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb_core.bundle, 9): no suitable image found. Did find:

/usr/local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb_core.bundle: mach-o, but wrong architecture - /usr/local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb_core.bundle
from /usr/local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb_core.bundle
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/taf2-curb-0.5.4.0/lib/curb.rb:1
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /Users/user/Sites/CSG/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in `require'
from ./lib/tokbox/base_api.rb:7

I have tried uninstalling the gem and reinstalling a number of versions with ARCHFLAGS="-arch i386" No errors or warnings are given in the install When i try and install with: rake install I get this error as well.

I am working on a mac ox 10.6 with ruby 1.8

i notice there are libcurl.4.dylib, libcurl.3.dylib, and libcurl.2.dlib and libcurl.dylib in my /usr/lib folder...

I did an install of the newest 7.20 curl package.

I have tried to install from the source as well and get this error

localhost:taf2-curb-ac0b465 user$ rake install
(in /Users/user/Downloads/taf2-curb-ac0b465)
/Users/user/Downloads/taf2-curb-ac0b465/ext/curb_core.bundle: dlopen(/Users/user/Downloads/taf2-curb-ac0b465/ext/curb_core.bundle, 9): no suitable image found.  Did find: (LoadError)
    /Users/user/Downloads/taf2-curb-ac0b465/ext/curb_core.bundle: mach-o, but wrong architecture - /Users/user/Downloads/taf2-curb-ac0b465/ext/curb_core.bundle
    from /Users/user/Downloads/taf2-curb-ac0b465/lib/curb.rb:1
    from /Users/user/Downloads/taf2-curb-ac0b465/tests/helper.rb:12:in `require'
    from /Users/user/Downloads/taf2-curb-ac0b465/tests/helper.rb:12
    from ./tests/tc_curl_download.rb:1:in `require'
    from ./tests/tc_curl_download.rb:1
    from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
    from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
    from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
    from /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
rake aborted!
Command failed with status (1): [/usr/local/bin/ruby -I"lib" "/usr/local/li...]

Suggestions?

解决方案

just try :

sudo env ARCHFLAGS="-arch x86_64" gem install curb

Worked for me.

这篇关于在Mac Snow Leopard上遇到遏制宝石问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆