I expect the problem is the path to the "chronic" code relative to script file. When you run irb paths are relative to the irb code location. When you run a script, paths are relative to the script file.
Try using this form of the require statement:
The path to chronic needs to be relative to the script file.
require File.dirname(__FILE__) + '/path/to/chronic'
Or you could use the absolute path:
Obviously this needs to be done with care or you are going to run into difficulties if you move the script to another system.
If this is part of a Rails application I find this works well:
Put your maintenance scripts in the root of your application and then add this to the start of the script:
That effectively makes all the objects and plug-ins available to your Rails application also available to the script. It also sets the environment to 'production' so maintenance tasks run against the correct data.
ENV['RAILS_ENV'] = 'production'