Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 在osx上为ruby on rails项目安装qrencoder gem_Ruby On Rails_Macos_Gem_Installation - Fatal编程技术网

Ruby on rails 在osx上为ruby on rails项目安装qrencoder gem

Ruby on rails 在osx上为ruby on rails项目安装qrencoder gem,ruby-on-rails,macos,gem,installation,Ruby On Rails,Macos,Gem,Installation,我正试图在MacOSX10.7.4上安装QREncoderGem,以便在RubyonRails项目中使用 当我尝试安装gem qrencoder时,我得到的是: 错误:安装qrencoder时出错: 错误:无法生成gem本机扩展。 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/Ruby extconf.rb 正在检查qrencode.h。。。对 正在-lqrencode中检查QRinput_new()。。。不 ***

我正试图在MacOSX10.7.4上安装QREncoderGem,以便在RubyonRails项目中使用

当我尝试安装gem qrencoder时,我得到的是:

错误:安装qrencoder时出错:
错误:无法生成gem本机扩展。
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/Ruby extconf.rb
正在检查qrencode.h。。。对
正在-lqrencode中检查QRinput_new()。。。不
***extconf.rb失败***
由于某些原因无法创建Makefile,可能是缺少
必要的库和/或标题。查看mkmf.log文件了解更多信息
细节。您可能需要配置选项。

mkmf.log文件除了上面提到的内容外,没有其他内容。 我已经用brew安装了qrencode-3.3.0,但gem安装失败:知道吗

当我输入qrencode时,我得到的是:

“dyld:未加载库:/usr/local/lib/libqrencode.3.dylib 引用自:/usr/local/bin/qrencode 原因:库版本不兼容:qrencode需要7.0.0或更高版本,但libqrencode.3.dylib提供5.0.0版本
跟踪/BPT陷阱:5“

首先通过自制程序安装libqrencode:

  brew install qrencode
然后再次尝试安装gem:

  gem install qrencoder

如果您没有自制软件和/或希望从源代码处编译,则有更详细的说明。

要在ubuntu 12.04上安装qrencode,请运行以下命令:--


Ubuntu:
sudo apt get install qrencode libqrencode dev
brew install qrencode运行良好。问题是gem安装qrencoder。我的问题是关于OSX,而不是ubuntu。是的,我在ubuntu上遇到过这个问题,其他解决方案对我不起作用,这个答案解决了我,所以我认为这可能会帮助其他人。
sudo apt-get install qrencode libqrencode-dev