It is possible to use and test bits and pieces of your rails application from outside rails e.g. from a ruby script.
You need to add
at the start of the script to access all your models and be able to manipulate database info.
This starts you up in development mode, if you want to force a particular mode you can do
The ENV statement needs to come first.
You need to add
require 'd:/research/rriki/config/environment'
at the start of the script to access all your models and be able to manipulate database info.
This starts you up in development mode, if you want to force a particular mode you can do
ENV['RAILS_ENV'] ||= 'production'
require 'd:/research/rriki/config/environment'
The ENV statement needs to come first.
Comments
Post a Comment