Echo command in rails


I am following the instructions given in the link

Mutou Mahendra's Code: TinyMCE:Plugins - spellchecker on rails using aspell
for doing spell check.

The problem I am facing here is, I am not able to run

echo "#{spell_check_text}" | aspell -a -l #{lang} command .
When I execute the method the above command is returning blank.

My question is How to run echo “statement” in rails.

In command prompt I am able to run the echo using exec
exec ‘echo “#{spell_check_text}” | aspell -a -l #{lang}’.