开发者

How do I resolve mach-o architecture errors when using capybara-webkit and QT

I am using capybara-webkit on OS X Lion. I used brew to install QT, which seems to have installed successfully along with the capybara-webkit gem. I'm getting the following errors and am not entirely sure how to resolve them.

I do some research online, but it look开发者_运维知识库s like my architectures match up as running file on the plugin shows i386. Any input?

2011-09-19 19:58:26.289 webkit_server[9927:107] Error loading /Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin/Contents/MacOS/SharePointBrowserPlugin:  dlopen(/Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin/Contents/MacOS/SharePointBrowserPlugin, 262): no suitable image found.  Did find:
    /Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin/Contents/MacOS/SharePointBrowserPlugin: mach-o, but wrong architecture
2011-09-19 19:58:26.291 webkit_server[9927:107] Error loading /Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin:  dlopen(/Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin, 265): no suitable image found.  Did find:
    /Library/Internet Plug-Ins/QuickTime Plugin.plugin/Contents/MacOS/QuickTime Plugin: mach-o, but wrong architecture


I recently had a similar issue where rails was throwing the "but wrong architecture no suitable image found" error when starting rails console or the rails server.

Running file on the associatd .dylib files, and the gem, generally returned either an applicable x86_64 version, or a universal which included it. Eventually, I traced it back to the actual version of Ruby I was running. The /usr/bin/ruby executable itself was only i386 compatible. This was really a shocker, as I assumed the new xcode and osx 10.7 would have brought me a 64 bit ruby.

Using RVM, I installed another instance of ruby (again 1.8.7). Doing this required that I install a new instance of readline (for which I used homebrew, : brew install readline) and installed the rvm with rvm install 1.8.7 --with-readline-dir=/usr/local/Cellar/readline/6.2.1/.

After doing this, and switching to use my new ruby instance (rvm use 1.8.7), all my gems were gone (the RVM install somehow changed my default gem_path.) gem install rake, followed by gem install bundler, and then bundle install got me up and running.

Long story short, make sure your ruby executable matches the instruction-set version that your ruby/rails packages are were built in.


I found the solution in the next link

https://github.com/thoughtbot/capybara-webkit/issues/157

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜