Build your first Rails application with this step-by-step guide covering setup, models, and API integration.
🚀 Get Started
brew install ruby
gem install rails
rails -v
sudo apt update
sudo apt install ruby-full
gem install rails
rails new blog_app
cd blog_app
rails server
Preview at localhost:3000
rails generate model Post title:string body:text published:boolean
rails db:migrate
rails generate controller Posts index show
resources :posts, only: %i[index show]
%{ for post in @posts }
h2= post.title
p= post.body
%{ end }
h= @post.title
p= @post.body