using Rails env in a ruby script
1 2 RAILS_ENV = ARGV[0] || 'development' 3 require File.dirname(__FILE__) + '/../config/environment'
DZone Snippets > sbnet > ruby
13393 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Stephane BRUN www.sbnet.fr
1 2 RAILS_ENV = ARGV[0] || 'development' 3 require File.dirname(__FILE__) + '/../config/environment'