2015년 9월 21일 월요일

새 프로젝트 생성 및 git 등록

rails와 ruby의 설치가 이미 완료되어 있다는 가정하에
새로운 프로젝트를 다음과 같이 생성한다.

$ rails new 프로젝트명

프로젝트 생성 확인

$ rails s -b 0.0.0.0 -p3000

git 초기화 및 저장소 등록

$ git init
$ git config --global user.email "email계정"
$ git config --global user.name "홍길동"
$ git remote add origin https://계정명@git 패스

$ touch readme
$ git add .
$ git commit -m "최초 커밋"
$ git push -u origin master
$ git pull -u origin master

[참고]
$ git push -u origin --all # pushes up the repo and its refs for the first time
$ git push -u origin --tags # pushes up any tags

http://noritersand.tistory.com/189

jquery 자바스크립트 라이브러리 디폴트로 설정
$ rails new myproject -j prototype

mysql 디비글 사용하기
$ rails new myproject -d mysql -j prototype


댓글 없음: