Any ideas why this doesn't work, I get a NoMethodError
when I try and run the code below via rails runner
.
Maybe I am calling the rails runner incorrectly, sorry new to Rails!
File location:
/app/scripts/data_import.rb
Command:
rails runner -e development DataImport.say_hi
Error:
undefined method `say_hi' for DataImport:Class (NoMethodError)
Code:
class DataImport
def say_hi
puts "hi"
end
end