尝试在Mac上安装Middleman时出现NoMethodError

时间:2013-06-26 16:02:02

标签: ruby macos install middleman

我目前正在尝试在Mac OS X上安装Middleman。我已经完成了一些初步步骤:

http://petertran.com.au/2013/02/23/how-to-install-middleman-mac-on-macosx/

但是通过“gem install middleman”的主要安装中断了。这是一些输出。

[..]
In file included from Variadic.c:35:
In file included from /usr/include/ffi/ffi.h:58:
/usr/include/ffi/fficonfig.h:120:9: warning: 'PACKAGE_TARNAME' macro redefined
#define PACKAGE_TARNAME "libffi"
        ^
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0/config.h:3:9: note: previous definition is here
#define PACKAGE_TARNAME ""
        ^
In file included from Variadic.c:35:
In file included from /usr/include/ffi/ffi.h:58:
/usr/include/ffi/fficonfig.h:123:9: warning: 'PACKAGE_VERSION' macro redefined
#define PACKAGE_VERSION "2.1"
        ^
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0/config.h:4:9: note: previous definition is here
#define PACKAGE_VERSION ""
        ^
5 warnings generated.
cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o ffi_c.bundle AbstractMemory.o ArrayType.o Buffer.o Call.o ClosurePool.o DataConverter.o DynamicLibrary.o ffi.o Function.o FunctionInfo.o LastError.o LongDouble.o MappedType.o MemoryPointer.o MethodHandle.o Platform.o Pointer.o Struct.o StructByReference.o StructByValue.o StructLayout.o Thread.o Type.o Types.o Variadic.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64     -lruby -lffi  -lpthread -ldl -lobjc  
make install
/usr/bin/install -c -m 0755 ffi_c.bundle ./.gem.20130626-33730-oxkffm
ERROR:  While executing gem ... (NoMethodError)
    undefined method `join' for nil:NilClass

感谢您的任何意见。在使用ruby二进制文件或任何此ffi模块的上下文中,我在Mac OS X编译器中的效果不是很好。所有这些警告(还有更多,我没有引用)对我来说似乎也有点奇怪。

1 个答案:

答案 0 :(得分:0)

在丹尼斯提示之后,我做了以下事情来解决它:

我卸载了MacPorts,并安装了最新的1.9.x Ruby,重新安装了MacPorts(最新版本)并重新安装了中间件。现在一切都很好。