# Error On relative\_url\_root

**URL:** <https://www.ruby-forum.com/t/error-on-relative-url-root/164022>\
**Category:** Rails\
**Created:** [March 27, 2009, 12:10am UTC](https://www.ruby-forum.com/t/error-on-relative-url-root/164022 "2009-03-27T00:10:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alangano](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/94ad74/32.png) [@alangano](https://www.ruby-forum.com/u/alangano)\
**Post date:** [March 27, 2009, 12:10am UTC](https://www.ruby-forum.com/t/error-on-relative-url-root/164022/1 "2009-03-27T00:10:34Z")

</div>

I’m attempting to mash together Adva CMS’ Fckeditor and the Fckeditor  
plugin provided by Scott Rutherford.

[http://blog.caronsoftware.com/2008/6/21/fckeditor-plugin-0-5-1-released](http://blog.caronsoftware.com/2008/6/21/fckeditor-plugin-0-5-1-released)

The Scott’s plugin has a controller than handles the Fckeditor file  
upload and browse, but it errors out on the following lines.

def upload\_directory\_path  
uploaded = request.relative\_url\_root.to\_s+“#{UPLOADED}/  
#{params[:Type]}”  
“#{uploaded}#{params[:CurrentFolder]}”  
end

If I remove the request.relative\_url\_root.to\_s it works fine.

def upload\_directory\_path  
uploaded = “#{UPLOADED}/#{params[:Type]}”  
“#{uploaded}#{params[:CurrentFolder]}”  
end

How do I make this go away without editing the plugin code? I found an  
article that says I’m supposed to set it in enviroment.rb but then I  
get errors that constants are not defined/found.

[http://www.hostingrails.com/37/ActionController-AbstractRequestrelative\_url\_root](http://www.hostingrails.com/37/ActionController-AbstractRequestrelative_url_root)

Alan G.
