class MyTestController < ApplicationController
def index
render_text "hello world"
end
end
This is what I am getting when I go to http://127.0.0.1:3000/My_Test/ :
NoMethodError in My testController#index
undefined method `render_text’ for #
RAILS_ROOT: C:/rails/rails_apps/cookbookApplication Trace | Framework Trace | Full Trace
app/controllers/my_test_controller.rb:5:in `index’
RequestParameters:
NoneShow session dump
Response Headers:
{“cookie”=>[], “Cache-Control”=>”no-cache”}
please keep in mind i am following this tutorial:
That tutorial is very old and out of date. The
render_textmethod no longer exists. Try the following instead: