I believe this is a super simple question for Ruby developers, although I am an expert in Java, but today is my first day in Ruby.
My code:
url="http://www.google.com"
redirect_to url
Error:
undefined method `redirect_to' for main:Object (NoMethodError)
Now, an educational guess is that I need to "require [some magical library]", but I search the web and stackoverflow:
"ruby redirect_to require" "ruby redirect_to doc" "ruby redirect_to lib" "ruby which library is redirect_to in" "ruby example code redirect_to" "ruby tutorial redirect_to" "open sesame"
and heck, nothing obvious which tells me this simple step to make a method call works. And it forced me to write this whole thing here.
Could you kindly give me a full piece of example code which can have the redirect_to method behave? Or better yet, tells me what keywords I should search for this kind of similar questions.