RubyonRails Learning
gem install rails
rails new demo
rails s -p 3001
Note: if no port is specified then it will run at 3000 port which is default.
1. Go to config/routes.rb
root "application#hello"
2. Go to app/controllers/application_controller.rb
Add a function called as hello inside the application controller class
def hello
render html: 'hello World'
end
rails generate controller pages