- xml - AJAX/Jquery XML 解析
- 具有多重继承的 XML 模式
- .net - 枚举序列化 Json 与 XML
- XML 简单类型、简单内容、复杂类型、复杂内容
我刚开始学习 Ruby,并尝试在 Macbook Air 上使用 RVM 安装最新版本,但一直失败。我一定是做错了什么,因为在网上进行了大量搜索后,我没有看到其他人在 Ruby 安装期间提示这个确切的错误。
采取的步骤:
Dima$ rvm install ruby-1.9.2-p290
Installing Ruby from source to: /Users/Dima/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...
ruby-1.9.2-p290 - #fetching
ruby-1.9.2-p290 - #extracted to /Users/Dima/.rvm/src/ruby-1.9.2-p290 (already extracted)
Fetching yaml-0.1.4.tar.gz to /Users/Dima/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/Dima/.rvm/src
Configuring yaml in /Users/Dima/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/Dima/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/Dima/.rvm/usr
ruby-1.9.2-p290 - #configuring
ruby-1.9.2-p290 - #compiling
ERROR: Error running 'make ', please read /Users/Dima/.rvm/log/ruby-1.9.2-p290/make.log
ERROR: There has been an error while running make. Halting the installation.
在此之后,根据错误信息的提示,我去查看了 make.log 文件:
compiling fiddle
/usr/bin/gcc-4.2 -I. -I../../.ext/include/x86_64-darwin10.7.0 -I../.././include -I../.././ext/fiddle -DRUBY_EXTCONF_H=\"extconf.h\" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -o closure.o -c closure.c
In file included from closure.c:1:
./fiddle.h:18:17: error: ffi.h: No such file or directory
In file included from ./fiddle.h:71,
from closure.c:1:
./conversions.h:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
closure.c:7: error: expected specifier-qualifier-list before ‘ffi_closure’
closure.c: In function ‘dealloc’:
closure.c:22: error: ‘fiddle_closure’ has no member named ‘pcl’
closure.c:26: error: ‘fiddle_closure’ has no member named ‘cif’
closure.c:27: error: ‘fiddle_closure’ has no member named ‘argv’
closure.c:27: error: ‘fiddle_closure’ has no member named ‘argv’
closure.c: In function ‘closure_memsize’:
closure.c:40: error: ‘fiddle_closure’ has no member named ‘cif’
closure.c:42: error: ‘fiddle_closure’ has no member named ‘argv’
closure.c:43: error: ‘ffi_closure’ undeclared (first use in this function)
closure.c:43: error: (Each undeclared identifier is reported only once
closure.c:43: error: for each function it appears in.)
closure.c: At top level:
closure.c:54: error: expected ‘)’ before ‘*’ token
closure.c: In function ‘allocate’:
closure.c:146: error: ‘fiddle_closure’ has no member named ‘pcl’
closure.c:146: error: ‘ffi_closure’ undeclared (first use in this function)
closure.c:151: error: ‘fiddle_closure’ has no member named ‘cif’
closure.c:151: error: ‘ffi_cif’ undeclared (first use in this function)
closure.c: In function ‘initialize’:
closure.c:163: error: ‘ffi_cif’ undeclared (first use in this function)
closure.c:163: error: ‘cif’ undeclared (first use in this function)
closure.c:164: error: ‘ffi_closure’ undeclared (first use in this function)
closure.c:164: error: ‘pcl’ undeclared (first use in this function)
closure.c:165: error: ‘ffi_status’ undeclared (first use in this function)
closure.c:165: error: expected ‘;’ before ‘result’
closure.c:169: error: ‘FFI_DEFAULT_ABI’ undeclared (first use in this function)
closure.c:177: error: ‘fiddle_closure’ has no member named ‘argv’
closure.c:177: error: ‘ffi_type’ undeclared (first use in this function)
closure.c:177: error: expected expression before ‘)’ token
closure.c:181: error: ‘fiddle_closure’ has no member named ‘argv’
closure.c:183: error: ‘fiddle_closure’ has no member named ‘argv’
closure.c:188: error: ‘fiddle_closure’ has no member named ‘cif’
closure.c:189: error: ‘fiddle_closure’ has no member named ‘pcl’
closure.c:191: error: ‘result’ undeclared (first use in this function)
closure.c:193: error: ‘fiddle_closure’ has no member named ‘argv’
closure.c:195: error: ‘FFI_OK’ undeclared (first use in this function)
closure.c:199: error: ‘callback’ undeclared (first use in this function)
make[1]: *** [closure.o] Error 1
make: *** [mkmain.sh] Error 1
我不确定如何准确解读这一点,我最初的直觉是说我没有安装 FFI,但我从未在 Ruby 的任何安装步骤中看到这一要求。这是我的电脑特有的东西吗?
如果有这方面经验的人提供任何帮助,我们将不胜感激。提前为帖子中的任何遗漏部分道歉,因为我不完全确定如何解决这个问题。请让我知道哪些附加信息有助于解决问题,我会将其添加到帖子中。
谢谢
最佳答案
Thoughtbot提出了一个很好的指南,可以在新的 OSX 安装上设置 Rails。一定要检查一下,因为它可能会帮助你:
http://robots.thoughtbot.com/post/8700977975/2011-rubyists-guide-to-a-mac-os-x-development
关于ruby - 在 Mac OS X Snow Leopard 上使用 RVM 安装 Ruby 1.9.2 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7207447/
在几个 SO 的问题中,有这些行可以访问代码的父目录,例如os.path.join(os.path.dirname(__file__)) returns nothing和 os.path.join(o
我想用 Python 更改文件模式。 os 模块具有三个功能上看似相同的功能: os.chmod os.fchmod os.lchmod 这三个版本有什么区别? 最佳答案 chmod 用于更改路径指定
考虑: pipe_read, pipe_write = os.pipe() 现在,我想知道两件事: (1) 我有两个线程。如果我保证只有一个正在读取 os.read(pipe_read,n) 而另一个
这个问题不太可能帮助任何 future 的访问者;它只与一个小的地理区域、一个特定的时间点或一个非常狭窄的情况有关,这些情况并不普遍适用于互联网的全局受众。为了帮助使这个问题更广泛地适用,visit
让我们以硬盘驱动器/网络接口(interface)为例。它由多个进程共享。现在多个进程可能会向硬盘驱动器发出并发命令来读取数据。当数据可用时,内核如何知道哪个进程的数据已准备好?操作系统和硬盘驱动器之
嗨,我正在尝试编写像这样的原子写入函数...... with tempfile.NamedTemporaryFile(mode= "w", dir= target_directory) as f:
net.Conn接口(interface)提供了 SetTimeout 方法,我应该用 os.Timeout 检查返回的错误.但是我看不到在返回的 os.Error 上调用 os.Timeout 的方
我正在使用 os 模块在我的 Django 项目 settings.py 文件中具有相对路径。变量 SITE_ROOT 设置为 settings.py 文件的当前工作目录,然后用于引用同样位于同一目录
正如我们所知,Windows 接受 "\" 和 "/" 作为分隔符。但是在python中,使用的是"\"。例如,调用 os.path.join("foo","bar"),将返回 'foo\\bar'。
我有以下工作目录:/Users/jordan/Coding/Employer/code_base ,我想要获取绝对路径的文件位于 /Users/jordan/Coding/Employer/code_
在 Python 中,如果路径中包含“~”,我能否确定扩展的用户调用将是绝对路径? 例如,这个表达式是否总是为真? path = '~/.my_app' os.path.expanduser(path
我是 Django 项目的初学者。Django 项目的 settings.py 文件包含这两行: BASE_DIR = os.path.dirname(os.path.dirname(os.path.
我有一个旧 MAC OS 文件存储中的文件集合。我知道集合存在文件名/路径名问题。问题源于我认为在原始操作系统中呈现为破折号的路径中包含一个代码点,但 Windows 与代码点斗争,并且其中一个包含
Ubuntu怎么安装mac os x主题呢?下文小编将为大家分享ubuntu14.04安装mac os x主题教程,安装MAC OS X&
我有一个 Firefox OS 应用程序,我希望在该应用程序之外打开一个链接(该链接指向不同的站点,在应用程序中打开它会使应用程序在没有强制的情况下无法使用)。我怎么做? Related bug re
我想为 Firefox OS 编写我的应用程序.使用什么样的语言(如 Android 的 Java 和 iOS 的 Objective C++)和工具(如 Eclipse、Xcode)? 最佳答案 适
我正在尝试创建一个 Palm OS 应用程序,以每 X 分钟或几小时检查一次网站,并在有数据可用时提供通知。我知道这种事情可以在新的 Palm 上完成——例如,当应用程序不在顶部时,我的 Centro
我需要在 Firefox OS 中显示全屏图像。我有一个具有 qHD 分辨率(960x540 像素)的“峰值”开发预览手机。 如何确保我的应用程序在其他具有不同屏幕分辨率的 firefox-os 设备
我正在尝试在 Firefox OS 中安装一个新的语言环境,但我不确定我是否正确地按照这些步骤操作。 首先,我尝试使用 Mercurial 下载所需的语言环境:它对我不起作用,Mercurial 说访
我有这个shell脚本Test.sh: #! /bin/bash FILE_TO_CHECK="/Users/test/start.txt" EXIT=0 while [ $EXIT -eq 0 ];
我是一名优秀的程序员,十分优秀!