How can I execute a image_tag method in a Rails console
Run the console $ rails c
Load helpers
include ActionView::Helpers
Execute the command
image_tag('test.png')
I got a strange error.
Please help!
Not sure why you're getting that error. It is strange.
But the Rails Console exposes the helper methods through the helper variable. So this should work:
helper.image_tag('test.png')