Forum: Ruby on Rails Error On relative_url_root

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ac3857a5bedfdacd9fa05ae205e4c8f6?d=identicon&s=25 Alan Gutierrez (Guest)
on 2009-03-27 00:10
(Received via mailing list)
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-...

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-Ab...

Alan Gutierrez
This topic is locked and can not be replied to.