Forum: Ruby on Rails run a script in the console?

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.
7759594c66801d6f311ff38fd3ddef2a?d=identicon&s=25 Chris Gunnels (ballhogjoni)
on 2009-03-19 21:54
I am trying to run a script in the script/console...but I dont think im
doing it right. can some one help?

I am typing:

rake /lib/tasks/my_rake_file.rake

into the console and I get:

SyntaxError: compile error
(irb):2: unknown regexp options - tak
  from (irb):2
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-03-19 22:14
(Received via mailing list)
On Mar 19, 8:54 pm, Chris Gunnels <rails-mailing-l...@andreas-s.net>
wrote:
> I am trying to run a script in the script/console...but I dont think im
> doing it right. can some one help?
>
> I am typing:
>
> rake /lib/tasks/my_rake_file.rake
>

You're supposed to do that from the command line. If you wanted to do
that not from the command line then you'd need to require the rake
gem, load that file and then look in the rake docs for how to execute
a task programatically.

Fred

> into the console and I get:
>
This topic is locked and can not be replied to.