기본 콘텐츠로 건너뛰기

3월, 2013의 게시물 표시

meteorite 기동시 spawn ENOENT 오류가 날때

OS X를 Lion 에서 Moutain Lion 으로 업그레이드 후 mrt를 가동시켰더니 $ mrt Stand back while Meteorite does its thing smart.json changed.. installing from smart.json Installing Meteor   branch: https://github.com/meteor/meteor.git#master Installing smart packages events.js:72         throw er; // Unhandled 'error' event               ^ Error: spawn ENOENT     at errnoException (child_process.js:948:11)     at Process.ChildProcess._handle.onexit (child_process.js:739:34) 이런 오류가 날때가 있다. spawn 을 하다가 오류가 났다는 건 외부 파일 실행을 하는 게 실패해서 인가 싶어서 보니 meteorite은 git을 사용하고 있었지. 그랬었지. which git 해보니 없었다. http://git-scm.com/ 여기 가서 다운받고 설치하자. 평화적으로 잘 해결이 되었다. 사실 해보고 나서 생각해보니 OS X에서 업글을 할때 git path를 잡아놓았던게 없어져서 그런 것인데 path 에 /usr/local/git/bin를 추가해주기만 해도 해결된다. git을 다시 설치하면 /etc/paths.d/git 아래에 path를 잡아준다. sudo sh -c 'which git > /etc/paths.d/git' 이런 식으로 잡아줘도 무방.

go로 android notification server를 만들었다.

내가 처한 갑갑한 상황은 이런 것이었다. 1. Android 용 notification server + client 를 구현해야한다. 2. 서비스 서버는 내가 손을 댈수 없지만 windows+asp 기반으로 되어있다. 3. 내 컴퓨터는 OS X다 (....) 4. 소스가 노출되는 형태의 결과물은 안된다(script류 X) 5. 서버 구동을 위해 별도의 프로그램을 설치할 수 없다 (java 안됨) 6. exe 파일을 만들어야한다. 그것도 OS X에서 7. C/C++로? 8. 테스트 용으로 디플로이도 해야할 것 같다. 그래서 떠올린 것이 go. 유지보수도 겸해서 천치도 읽을 수 있게 짜고 싶었다. go-gcm package를 일단 써서 후지고 빠르게 만들자. https://gist.github.com/acidsound/5121536#file-tinygcmserver-go // +build !appengine package main   /* * Usage: ./TinyGCMServer.go <API_KEY> <Server URL(:port)> * Test: curl -d "<NOTIFICATION MESSAGE>" http://serverURL/sendMessage?target=<REGISTRATION_ID> */ import ( "fmt" "github.com/googollee/go-gcm" "io/ioutil" "net/http" "os" )   var API_KEY string   func main () { serverURL := "localhost:8000" if len ( os . Args ) > 1 { API_KE