← 홈

🛤️

⌘K
🤖
Claude Code AI 도구
🤗
Hugging Face AI 도구
🦜
LangChain AI 도구
🧠
Keras AI 도구
🦙
Ollama AI 도구
🐍
Python 프로그래밍 언어
🟨
JavaScript 프로그래밍 언어
🔷
TypeScript 프로그래밍 언어
⚛️
React 프로그래밍 언어
🐹
Go 프로그래밍 언어
🦀
Rust 프로그래밍 언어
📊
MATLAB 프로그래밍 언어
🗄️
SQL 프로그래밍 언어
⚙️
C/C++ 프로그래밍 언어
Java 프로그래밍 언어
🟣
C# 프로그래밍 언어
🍎
Swift 프로그래밍 언어
🟠
Kotlin 프로그래밍 언어
Next.js 프로그래밍 언어
💚
Vue.js 프로그래밍 언어
🔥
Svelte 프로그래밍 언어
🎨
Tailwind CSS 프로그래밍 언어
💚
Node.js 프로그래밍 언어
🌐
HTML 프로그래밍 언어
🎨
CSS/SCSS 프로그래밍 언어
🐘
PHP 프로그래밍 언어
💎
Ruby 프로그래밍 언어
🔴
Scala 프로그래밍 언어
📊
R 프로그래밍 언어
🎯
Dart 프로그래밍 언어
💧
Elixir 프로그래밍 언어
🌙
Lua 프로그래밍 언어
🐪
Perl 프로그래밍 언어
🅰️
Angular 프로그래밍 언어
🚂
Express.js 프로그래밍 언어
🐱
NestJS 프로그래밍 언어
🛤️
Ruby on Rails 프로그래밍 언어
◼️
GraphQL 프로그래밍 언어
🟪
Haskell 프로그래밍 언어
💚
Nuxt.js 프로그래밍 언어
🔷
SolidJS 프로그래밍 언어
htmx 프로그래밍 언어
💻
VS Code 개발 도구
🧠
PyCharm 개발 도구
📓
Jupyter 개발 도구
🧠
IntelliJ IDEA 개발 도구
💚
Neovim 개발 도구
🔮
Emacs 개발 도구
🔀
Git DevOps & CLI
🐳
Docker DevOps & CLI
☸️
Kubernetes DevOps & CLI
☁️
AWS CLI DevOps & CLI
🔄
GitHub Actions DevOps & CLI
🐧
Linux 명령어 DevOps & CLI
💻
Bash 스크립팅 DevOps & CLI
🌐
Nginx DevOps & CLI
📝
Vim DevOps & CLI
🔨
Makefile DevOps & CLI
🧪
Pytest DevOps & CLI
🪟
Windows DevOps & CLI
📦
패키지 매니저 DevOps & CLI
🍎
macOS DevOps & CLI
🏗️
Terraform DevOps & CLI
🔧
Ansible DevOps & CLI
Helm DevOps & CLI
🔨
Jenkins DevOps & CLI
🔥
Prometheus DevOps & CLI
📊
Grafana DevOps & CLI
💻
Zsh DevOps & CLI
🐟
Fish Shell DevOps & CLI
💙
PowerShell DevOps & CLI
🔄
Argo CD DevOps & CLI
🔀
Traefik DevOps & CLI
☁️
Azure CLI DevOps & CLI
☁️
Google Cloud CLI DevOps & CLI
📟
tmux DevOps & CLI
🔧
jq DevOps & CLI
✂️
sed DevOps & CLI
📊
awk DevOps & CLI
🌊
Apache Airflow DevOps & CLI
🔢
NumPy 데이터베이스 & 데이터
🐼
Pandas 데이터베이스 & 데이터
🔥
PyTorch 데이터베이스 & 데이터
🧠
TensorFlow 데이터베이스 & 데이터
📈
Matplotlib 데이터베이스 & 데이터
🐘
PostgreSQL 데이터베이스 & 데이터
🐬
MySQL 데이터베이스 & 데이터
🍃
MongoDB 데이터베이스 & 데이터
🔴
Redis 데이터베이스 & 데이터
🔍
Elasticsearch 데이터베이스 & 데이터
🤖
Scikit-learn 데이터베이스 & 데이터
👁️
OpenCV 데이터베이스 & 데이터
Apache Spark 데이터베이스 & 데이터
🪶
SQLite 데이터베이스 & 데이터
Supabase 데이터베이스 & 데이터
🔵
Neo4j 데이터베이스 & 데이터
📨
Apache Kafka 데이터베이스 & 데이터
🐰
RabbitMQ 데이터베이스 & 데이터
🔤
Regex 유틸리티
📝
Markdown 유틸리티
📄
LaTeX 유틸리티
🔐
SSH & GPG 유틸리티
🌐
curl & HTTP 유틸리티
📜
reStructuredText 유틸리티
🚀
Postman 유틸리티
🎬
FFmpeg 유틸리티
🖼️
ImageMagick 유틸리티
🔍
ripgrep 유틸리티
🔍
fzf 유틸리티
📗
Microsoft Excel 오피스 애플리케이션
📘
Microsoft Word 오피스 애플리케이션
📙
Microsoft PowerPoint 오피스 애플리케이션
📝
한컴 한글 한컴오피스
📽️
한컴 한쇼 한컴오피스
📊
한컴 한셀 한컴오피스
📄
Google 문서 Google Workspace
📊
Google 스프레드시트 Google Workspace
📽️
Google 프레젠테이션 Google Workspace
🔌
Cadence Virtuoso EDA & 하드웨어
⚙️
Synopsys EDA EDA & 하드웨어
💎
Verilog & VHDL EDA & 하드웨어
LTSpice EDA & 하드웨어
🔧
KiCad EDA & 하드웨어
📝
Notion 생산성 도구
💎
Obsidian 생산성 도구
💬
Slack 생산성 도구
🎮
Discord 생산성 도구
🎨
Figma 디자인 도구
📘
Confluence Atlassian
📋
Jira Atlassian
🃏
Jest 테스팅
Vitest 테스팅
🎭
Playwright 테스팅
🌲
Cypress 테스팅
🌐
Selenium 테스팅
💙
Flutter 모바일 개발
📱
React Native 모바일 개발
🍎
SwiftUI 모바일 개발
📱
Expo 모바일 개발
🐍
Django 웹 프레임워크
FastAPI 웹 프레임워크
🌶️
Flask 웹 프레임워크
🍃
Spring Boot 웹 프레임워크
🍸
Gin 웹 프레임워크
Vite 빌드 도구
📦
Webpack 빌드 도구
esbuild 빌드 도구
🐘
Gradle 빌드 도구
🪶
Maven 빌드 도구
🔧
CMake 빌드 도구
🎮
Unity 게임 개발
🤖
Godot 게임 개발
🔌
Arduino 임베디드 & IoT
🔍
Nmap 보안
🐕
Datadog 모니터링
📖
Swagger/OpenAPI 문서화
검색 결과가 없습니다
EN KO

CLI 명령어

Rails CLI

rails new myapp 새 앱 생성
rails new myapp --api API 전용 앱 생성
rails server / rails s 서버 시작
rails console / rails c 콘솔 열기
rails dbconsole / rails db 데이터베이스 콘솔
rails routes 모든 라우트 표시
rails routes -g users 라우트 검색

생성

rails g model User name:string email:string 모델 생성
rails g controller Users index show 컨트롤러 생성
rails g scaffold Post title:string body:text 스캐폴드 생성
rails g migration AddAgeToUsers age:integer 마이그레이션 생성
rails g mailer UserMailer 메일러 생성
rails g job ProcessData 잡 생성
rails destroy model User 생성된 파일 삭제

데이터베이스

rails db:create 데이터베이스 생성
rails db:migrate 마이그레이션 실행
rails db:rollback 마이그레이션 롤백
rails db:seed 시드 실행
rails db:reset 삭제, 생성, 마이그레이션, 시드
rails db:migrate:status 마이그레이션 상태

모델

모델 기초

모델 정의
class User < ApplicationRecord
  # Validations
  validates :name, presence: true
  validates :email, uniqueness: true

  # Associations
  has_many :posts
  belongs_to :company
end
유효성 검사
validates :name, presence: true
validates :email, format: { with: URI::MailTo::EMAIL_REGEXP }
validates :age, numericality: { greater_than: 0 }
validates :terms, acceptance: true
validates :password, length: { minimum: 6 }
validates :username, uniqueness: { case_sensitive: false }
콜백
before_validation :normalize_email
before_save :encrypt_password
after_create :send_welcome_email
after_destroy :cleanup_files
스코프
scope :active, -> { where(active: true) }
scope :recent, -> { order(created_at: :desc) }
scope :by_status, ->(status) { where(status: status) }

# Usage: User.active.recent

연관관계

일대다
# User has many Posts
class User < ApplicationRecord
  has_many :posts, dependent: :destroy
end

class Post < ApplicationRecord
  belongs_to :user
end
다대다
# Through join table
class User < ApplicationRecord
  has_many :user_roles
  has_many :roles, through: :user_roles
end

class Role < ApplicationRecord
  has_many :user_roles
  has_many :users, through: :user_roles
end
다형성
class Comment < ApplicationRecord
  belongs_to :commentable, polymorphic: true
end

class Post < ApplicationRecord
  has_many :comments, as: :commentable
end

쿼리

찾기
User.find(1)
User.find_by(email: "a@b.com")
User.find_by!(email: "a@b.com")  # raises
User.first
User.last
User.all
Where
User.where(active: true)
User.where("age > ?", 18)
User.where(age: 18..30)
User.where.not(role: "admin")
User.where(name: ["Alice", "Bob"])
정렬 및 제한
User.order(:name)
User.order(created_at: :desc)
User.limit(10)
User.offset(20)
User.limit(10).offset(20)
집계
User.count
User.sum(:age)
User.average(:age)
User.maximum(:age)
User.minimum(:age)
User.group(:role).count
조인
User.joins(:posts)
User.includes(:posts)  # eager load
User.left_joins(:posts)

컨트롤러

컨트롤러 기초

RESTful 컨트롤러
class UsersController < ApplicationController
  before_action :set_user, only: [:show, :edit, :update, :destroy]

  def index
    @users = User.all
  end

  def show
  end

  def new
    @user = User.new
  end

  def create
    @user = User.new(user_params)
    if @user.save
      redirect_to @user, notice: "Created!"
    else
      render :new
    end
  end

  private

  def set_user
    @user = User.find(params[:id])
  end

  def user_params
    params.require(:user).permit(:name, :email)
  end
end

응답

렌더
render :new
render json: @user
render json: @user, status: :created
render plain: "OK"
render html: "<h1>Hello</h1>".html_safe
리다이렉트
redirect_to users_path
redirect_to @user
redirect_to root_path, notice: "Success"
redirect_back fallback_location: root_path
필터
before_action :authenticate_user!
before_action :set_user, only: [:show, :edit]
after_action :log_activity
around_action :wrap_in_transaction

라우트

라우팅

RESTful 라우트
Rails.application.routes.draw do
  resources :users
  resources :posts, only: [:index, :show]
  resources :comments, except: [:destroy]
end
중첩 라우트
resources :users do
  resources :posts
end
# /users/:user_id/posts/:id
커스텀 라우트
get "/about", to: "pages#about"
post "/login", to: "sessions#create"
match "/auth", to: "auth#callback", via: [:get, :post]
Member & Collection
resources :posts do
  member do
    post :publish
  end
  collection do
    get :search
  end
end
네임스페이스
namespace :admin do
  resources :users
end
# /admin/users

마이그레이션

마이그레이션 예시

테이블 생성
class CreateUsers < ActiveRecord::Migration[7.0]
  def change
    create_table :users do |t|
      t.string :name, null: false
      t.string :email, index: { unique: true }
      t.integer :age
      t.references :company, foreign_key: true
      t.timestamps
    end
  end
end
열 추가
class AddAgeToUsers < ActiveRecord::Migration[7.0]
  def change
    add_column :users, :age, :integer
    add_index :users, :age
  end
end
열 변경
class ChangeNameInUsers < ActiveRecord::Migration[7.0]
  def change
    change_column :users, :name, :string, limit: 100
    rename_column :users, :name, :full_name
  end
end
열 제거
class RemoveAgeFromUsers < ActiveRecord::Migration[7.0]
  def change
    remove_column :users, :age, :integer
  end
end