vidur punj
vidur punj

Reputation: 5881

Run rails code online

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

time_ago_in_words(Time.now - 15.hours)

Thanks

Upvotes: 5

Views: 2863

Answers (2)

claptimes
claptimes

Reputation: 1717

Rails for Zombies provides an interpreter, but it's geared toward their lessons.

Upvotes: 1

Fiona T
Fiona T

Reputation: 1929

The hours function is specific to Rails, which is a Ruby library. Rails is not loaded in CodePad. You'll have to install Rails on your computer to access those functions. Consult a guide for instructions. 1

Upvotes: 3

Related Questions