因为使用的嵌入式平台,需要一种动态语言做一点后台工作,所以先用 ruby 试试。交叉编译很方便,install 列表:
installing binary commands: /output/ruby/usr/bin
installing base libraries: /output/ruby/usr/lib
installing arch files: /output/ruby/usr/lib/ruby/1.9.1/arm-linux-eabi
installing pkgconfig data: /output/ruby/usr/lib/pkgconfig
installing command scripts: /output/ruby/usr/bin
installing library scripts: /output/ruby/usr/lib/ruby/1.9.1
installing common headers: /output/ruby/usr/include/ruby-1.9.1
installing manpages: /output/ruby/usr/share/man/man1
installing extension objects: /output/ruby/usr/lib/ruby/1.9.1/arm-linux-eabi
installing extension objects: /output/ruby/usr/lib/ruby/site_ruby/1.9.1/arm-linux-eabi
installing extension objects: /output/ruby/usr/lib/ruby/vendor_ruby/1.9.1/arm-linux-eabi
installing extension headers: /output/ruby/usr/include/ruby-1.9.1/arm-linux-eabi
installing extension scripts: /output/ruby/usr/lib/ruby/1.9.1
installing extension scripts: /output/ruby/usr/lib/ruby/site_ruby/1.9.1
installing extension scripts: /output/ruby/usr/lib/ruby/vendor_ruby/1.9.1
installing extension headers: /output/ruby/usr/include/ruby-1.9.1/ruby
但是将其下载到开发板后出现 rubygems.rb LoadError:
# ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [arm-linux-eabi]
# ruby send_mail.rb
<internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError)
from <internal:gem_prelude>:1:in `<compiled>'
#
猜测是 gem、ruby 库路径的问题,是不是还有些环境变量没设置呢?有经验的给点建议把哈哈~谢谢~ 不行就先 python 跑了,python+buildroot 交叉编译各种愉快啊。