본문 바로가기

[iOS] xcode-select --install error x-code 에서 Downloads 안에 Command Line Tool가 없을 경우 터미널에서 xcode-select --install 명령어로 해결해 주면 된다. 설치가 잘 되었을 경우 설치가 잘 안되었을 경우 can't install the software because it is not currently available from the software update server라고 뜨며 error가 날 경우가 있다. https://discussions.apple.com/message/23548005#23548005 You can download them as follows: Open up XcodeIn the application menu item "Xcode" select Open Develop.. 더보기
[Sinatra] Ruby, db 연결 1. 폴더를 만든다 (ex>. sinatraTest) 2. 폴더를 Sublime 으로 드래그 하면 왼쪽에 네비창이 생긴다. 3. Gemfile 을 만든다 (확장자 없이) source “http://www.rubygems.org" gem ’sinatra’ 4. 터미널에서 폴더로 들어가서 sudo gem install bundler (번들러를 설치한다) sudo bundle install 또는 bundle install (Gemfile 에 있는 sinatra를 설치한다) 5. runner.rb (루비 파일을 만든다) require ‘sinatra’ get ‘/‘ do return “Hello World!!” end 6. 터미널로 가서 해당 폴더 위치에서 ruby runner.rb (파일을 실행시킨다. 끌때는.. 더보기
[Ruby] 콜라츠 추측 콜라츠 추측 이란 http://ko.wikipedia.org/wiki/%EC%BD%9C%EB%9D%BC%EC%B8%A0_%EC%B6%94%EC%B8%A1 1. 루비를 설치2. 터미널에서 저장된 파일위치에서 디버깅ruby untitled.rb (파일명 : untitled.rb)확장자는 rb require 'benchmark' # def main# n=0 # if n1# if n%2==0# n/2# else# n*3+1# end# end# end # main() # n이 짝수: n / 2# n이 홀수: 3 * n + 1# n이 1이면 반환 # def cycle(n)# be = [] # be << n # if n % 2 == 0# be << n / 2# end# .. 더보기