Forum: Ruby script/runner error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
CiriusMex (Guest)
on 2008-12-24 03:00
(Received via mailing list)
Hi folks ^^,

Ok I need some help here. I'm trying to create a script to
automatically send Newsletters every day. The script is ready, but as
I never used ruby script/runner I just wanted to make some test
before. So I created the following script file in my "app" folder
named "newsletter_script.rb" and with the following code:

class NewsletterScript
  printf "\nThat's it!"
end

Now when I'm executing the script command "ruby script/runner /app/
newsletter_script.rb" I got the following error:
C:/InstantRails-2.0/ruby/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/
commands/runner.rb:47: (eval):1: compile error (SyntaxError)
(eval):1: unknown regexp options - wlttr
(eval):1: syntax error, unexpected tIDENTIFIER, expecting $end
/app/newsletter_script.rb
                      ^ from C:/InstantRails-2.0/ruby/lib/ruby/
site_ruby/1.8/rub
ygems/custom_require.rb:27:in `eval'
        from C:/InstantRails-2.0/ruby/lib/ruby/gems/1.8/gems/
rails-2.0.2/lib/com
mands/runner.rb:47
        from C:/InstantRails-2.0/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_req
uire.rb:27:in `gem_original_require'
        from C:/InstantRails-2.0/ruby/lib/ruby/site_ruby/1.8/rubygems/
custom_req
uire.rb:27:in `require'
        from script/runner:3

Looked on internet and didn't find any help for this unknow regexp
error (I guess did something wrong but what?!!)...

If anyone as an idea well thanks in advance for the help ;)

PD: If the message is not quite clear just let me know, I'm french and
my english isn't that good :)
Brian C. (Guest)
on 2008-12-24 11:41
CiriusMex wrote:
> Ok I need some help here. I'm trying to create a script to
> automatically send Newsletters every day.

This is a problem with Rails (or InstantRails), so your question is best
asked on a Rails mailing list.

The Rails framework just happens to be written in the Ruby programming
language. Whilst there are some Rails users here, you'll get much better
coverage on the right list.

You wouldn't ask a question about Firefox on a gcc mailing list :-)
This topic is locked and can not be replied to.