Run Reilly Code Online

Can any body give me a link to run rails code online?
I tried codepad.org and tryruby.org , they are quick ruby ​​code run
When I use Time.now , it gives me the correct result, but when I try to run as below, it gives me errors:

time_ago_in_words(Time.now - 15.hours)

thanks

+4
source share
2 answers

The hours function is specific to Rails, which is a Ruby library. Rails does not load in CodePad. You will need to install Rails on your computer to access these features. Refer to the manual for instructions. 1

+2
source

Rails for Zombies provides an interpreter, but it focuses on their lessons.

+1
source

All Articles