RAILS_ROOT question

General discussion on technical and managerial topics
no avatar
jlillywh
 
Posts: 1
Joined: Thu Jul 10, 2008 8:08 pm

RAILS_ROOT question

by jlillywh » Thu Jul 10, 2008 8:13 pm

I'm running an activerecord script that has this command in it:

CSV.open("#{RAILS_ROOT}/doc/RiverFlow2.csv", 'r') do |row|
etc...

Problem is, I get the following error when I run it:

c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:278:in `load_missing_constant': uninitialized constant RAILS_ROOT (NameError)
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:467:in `const_missing'
from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:479:in `const_missing'

I would really appreciate any ideas you might have.

Jason

Return to General Discussion

cron