在MAC OS中为ruby安装linalg失败

时间:2013-12-10 07:10:51

标签: ruby

我遵循以下指南为Ruby env安装linalg。

http://www.quora.com/Installation-Instructions/How-do-I-install-Ruby-linalg-library-on-Mac

它有效,但是当我尝试在'irb'中要求lib时,它会引发错误。

环境:Ruby:2.0.0-p0 lapack:3.5.0(我也试过3.4.0)

我已经花了3个小时,但没有弄清楚问题。 当我尝试在命令行中要求lib时,这是错误。

似乎某处使用18作为参数,超过最大值为-2..15。

2.0.0-p0 :002 > require 'linalg'
ArgumentError: arity out of range: 18 for -2..15
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/linalg.rb:7:in `<top (required)>'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from (irb):2
from /Users/xxx/.rvm/rubies/ruby-2.0.0-p0/bin/irb:16:in `<main>'

1 个答案:

答案 0 :(得分:1)

我为ruby 2 / 2.1做了fork和修复编译。 你可以尝试这个分叉:https://github.com/parallel588/linalg