Topic: RAILS_ROOT :: UnInitialized Constant RAILS_TOOT

I am coding for my Ruby Rake.

one of function is having "#{$RAILS_ROOT}/public/#{folder}".

When i am trying to execute my rake (RAKE) task, i am getting an error :: ERROR :: "uninitialized constant RAILS_ROOT"

How can i fix this....???

Re: RAILS_ROOT :: UnInitialized Constant RAILS_TOOT

Try to remove the dollar sign before RAILS_ROOT constant:

"#{RAILS_ROOT}/public/#{folder}"