텔레그램 웹툰 봇 로그가 다 흰색이다. 그냥 그런가보다 했는데, 가만히 생각해보니 sqlite 로그는 여러 색상이 표시된다. 그래서 찾아보니 바로 나왔다. https://github.com/fazibear/colorize 이제 이런 식으로 로그가 표시된다.Read More →

VSCode로만 하다가 옆자리 직원이 RubyMine 으로 쉽게 하길래 나도 해볼라고 했더니 유료였다. 그래서 일단 넷빈즈도 비슷하게 편한지 알아보기 위해 설치를 해본다. OpenJDK 다운로드: http://openjdk.java.net /Library/Java/JavaVirtualMachines에 압축 풀기 .zshrc에 jdk 경로Read More →

30분 마다 한 번씩 뭔가 하게하려면 crontab에 작업을 등록해야 한다. 하지만 직접 수정하면 무지 귀찮으니 gem을 찾아봤다. 그렇게 찾은게 whenever 프로젝트 폴더로 이동 후$ wheneverize .  를 입력하면 config/schedule.rb 이 생성되는데,Read More →

웹툰 봇이 있었는데, 어느 순간부터 동작이 되지 않는다. 그렇다고 만화보자고 네이버나 다음 웹툰 앱을 설치하는 것도 번거롭고… 그래서 나도 만들어 본다. 텔레그램 봇 등록 https://steemit.com/kr-dev/@maanya/30 https://kimdoky.github.io/diary/2017/08/26/Telegram_bot.html 프로필 사진 변경 이미지Read More →

기존 루비 온 레일스  프로젝트를 만져봐야 한다. 간단한 것만 아는 수준이라 자신은 없지만, 그래도 해야했다. 근데 회사 맥에 설치할 때는 문제없었는데, 집의 맥에서는 mysql 관련 에러가 난다.     git으로Read More →

$ rails c >> Food.delete_all >> ActiveRecord::Base.connection.execute(“DELETE from sqlite_sequence where name = ‘foods'”) 도움 받은 곳 : http://stackoverflow.com/questions/1921074/how-to-reset-a-single-table-in-rails http://stackoverflow.com/questions/1601697/sqlite-reset-primary-key-fieldRead More →

create_table “store_categories”, force: :cascade do |t| t.string “title” end create_table “stores”, force: :cascade do |t| t.integer “category_id” t.string “name” end class StoreCategory < ActiveRecord::Base has_many :stores, foreign_key: :category_id end classRead More →