Forum: Ruby on Rails Create a script that includes the resources of a project

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.
8458ed8e78b2660f8b839f052e20f65f?d=identicon&s=25 Nicolas Blanco (slainer68)
on 2007-03-11 11:00
Hi!
What includes/requires should I write to create a separate console
script that includes all the resources (models) of a Rails project (like
script/console) ?

Thanks.
Nicolas.
8bc543795b502900b5333aea73ad5533?d=identicon&s=25 Eden Li (edenli)
on 2007-03-11 12:06
(Received via mailing list)
require 'path/to/rails_root/config/boot'
require 'path/to/rails_root/config/environment'
require 'irb/completion'
require 'console_app'
require 'console_sandbox'
require 'console_with_helpers'
...

you probably want to specify this on the command-line to irb like
script/console does.

Take a look at /path/to/lib/ruby/gems/1.8/gems/rails-1.x.x/lib/
commands/console.rb for more info

On Mar 11, 6:00 pm, Nicolas Blanco <rails-mailing-l...@andreas-s.net>
This topic is locked and can not be replied to.