In my controller method, I am doing this

          File.open ("#{RAILS_ROOT}/directory/
#{params[:file_name]}.#{params[:file_type]}", 'w') do |f|
                f.write(params[:file_body])
         end

but I am getting this error

           NoMethodError (undefined method ` ' for
#<ProgramsController:0xb66b4354>):

I have tried passing the absolute path and still it doesn't work. And
I have also tried escaping the whitespace between ".open" and
"("...still doesn't work.
I don't know what I am doing wrong and how can I fix it?

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to