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.
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.
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 B. [email protected]
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs