更新到Mountain Lion后,我尝试安装1.8.7,然后出错了.找不到X11文件,我安装了Xquarkz,但没有任何改变.怎么了?
Fail to find [tclConfig.sh, tkConfig.sh]
Use MacOS X Frameworks.
Find Tcl/Tk libraries. Make tcltklib.so which is required by Ruby/Tk.
clang -I. -I../.. -I../../. -I../.././ext/tk -DHAVE_RB_SAFE_LEVEL -DHAVE_RB_HASH_LOOKUP -DHAVE_RB_PROC_NEW -DHAVE_RB_OBJ_TAINT -DHAVE_ST_PTR -DHAVE_ST_LEN -DRUBY_VERSION=\"1.8.7\" -DRUBY_RELEASE_DATE=\"2012-06-29\" -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -DWITH_TCL_ENABLE_THREAD=0 -fno-common -g -O2 -fno-common -pipe -fno-common -c stubs.c
In file included from stubs.c:10:
/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
# include <X11/Xlib.h>
^
1 error generated.
make[1]: *** [stubs.o] Error 1
make: *** [all] Error 1
Run Code Online (Sandbox Code Playgroud) 如何在backbone.js中链接收集方法?
var Collection = this.collection;
Collection = Collection.where({county: selected});
Collection = Collection.groupBy(function(city) {
return city.get('city')
});
Collection.each(function(city) {
// each items
});
Run Code Online (Sandbox Code Playgroud)
我试过这样的事,但这是错的:
Object[object Object],[object Object],[object Object] has no method 'groupBy'
Run Code Online (Sandbox Code Playgroud)