C:\Program Files (x86)\Vim\vim74\ftplugin\ruby.vim 是发生错误:
第 122 行:
E171: 缺少 :endif
..........................................
原因:
没有设置 ruby 路径
_vimrc 种添加:
let g:ruby_path='C:\\ruby\\Ruby200-x64\\bin'
错误不再出现
安装文档时错误: unable to convert "\x**" from ASCII-8BIT to UTF-8 fro lib/****
重新安装一下 rdoc
gem install rdoc
gem install qtruby4
出现错误:ERROR: while executing gem ... (ArgumentError) malformed format string - %)
执行: gem update --system
make[2]: Leaving directory `/data/apps/sa_gitlab/temp/ruby-1.9.3-p392/ext/objspace'make[2]: Entering directory `/data/apps/sa_gitlab/temp/ruby-1.9.3-p392/ext/openssl'
compiling ossl_pkey_ec.c
ossl_pkey_ec.c: 在函数‘ossl_ec_group_initialize’中:
ossl_pkey_ec.c:761: 警告:隐式声明函数‘EC_GF2m_simple_method’
ossl_pkey_ec.c:761: 警告:赋值时将整数赋给指针,未作类型转换
ossl_pkey_ec.c:816: 错误:‘EC_GROUP_new_curve_GF2m’未声明(在此函数内第一次使用)
ossl_pkey_ec.c:816: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
ossl_pkey_ec.c:816: 错误:所在的函数内也只报告一次。)
make[2]: *** [ossl_pkey_ec.o] 错误 1
make[2]: Leaving directory `/data/apps/sa_gitlab/temp/ruby-1.9.3-p392/ext/openssl'
make[1]: *** [ext/openssl/all] 错误 2
make[1]: Leaving directory `/data/apps/sa_gitlab/temp/ruby-1.9.3-p392'
make: *** [build-ext] 错误 2
可能你没有 C 有关基础, Ruby(MRI) 是用 C 实现的, 能用的编译器如我上面说的有 gcc 和 clang, 而 llvm-gcc 不行.编译第一步是 ./configure, 检测环境并产生 makefile, 这时就决定好了用哪个编译器, 如果你一开始编译出错了, 然后换了编译器, 应该把源代码目录删掉再继续.
选择 GCC 最简单的方式就是 configure 之前
export CC=`your path to gcc`
替换源直接打开文件编辑 ~/.rvm/config/db 替换 ftp.ruby-lang.org/pub/ 成 ruby.taobao.org/mirrors/ 就好了嘛...
最大的障碍是 Mac 更新很快很频繁, ruby 相关的开发也很活跃, 所以大部分教程都会很快过时, 然后无头苍蝇般每个都弄一遍结果就是像你这样产生奇怪的问题, 按照 rvm requirements 去做是不会出问题的