Displaying 20 results from an estimated 68 matches for "relative_url_root".
2007 Oct 11
2
relative_url_root and javascript_include_tag
Hi. In my environment.rb, I have:
ActionController::AbstractRequest.relative_url_root = "/foobar"
In my layout, I have:
<%= javascript_include_tag :defaults %>
Question 1:
I am getting an error:
ActionController::RoutingError (no route found to match
"/javascripts/prototype.js" with {:method=>:get}):
When I remove the relative_url_root, everything...
2008 Jan 31
2
Facebooker and file_column
Facebooker URL Rewriter stuff overloads ActionController::AbstractRequest.relative_url_root, causing a conflict with the plugin file_column and possibly other utilities. file_column constructs image URLs using the server host and relative_url_root
This is not related to the sandbox patch I added to the rewriter. Facebooker overloaded relative_url_root before I touched it.
I''v...
2008 Jan 09
1
relative_url_root and problems with CSS url()
I''m using relative_url_root to allow my app to be run from a sub-
domain. Things work fine except with images that are referenced in my
CSS code.
For example,
background-image: url(/images/bg_image.jpg);
does not take into account the value in relative_url_root.
Consequently, my background image (and other images similarl...
2010 Jul 08
0
Rails3 -- Replacement for ActionController::Base.relative_url_root?
I have a post on stackoverflow which outlines the problem I am having:
http://stackoverflow.com/questions/3181746/what-is-the-replacement-for-actioncontrollerbase-relative-url-root
In short, I ported a rails 2.x to rails3 and started getting a
deprecation warning for using
ActionController::Base.relative_url_root. I switched to using
config.action_controller.relative_url_root and while any calls to
external resources (like css/jss/images) does have the url root
appended, none of my routes do.
Is config.action_controller.relative_url_root the right replacements
for ActionController::Base.relative_url_root?...
2006 Jan 04
1
[BUG?] image_tag
...ritten to work:
def compute_public_path(source, dir, ext)
source = "/#{dir}/#{source}" unless source.first == "/" || source.include?(":")
source = "#{source}.#{ext}" unless source.include?(".")
source = "#{@controller.request.relative_url_root}#{source}" unless %r{^[-a-z]+://} =~ source
source = ActionController::Base.asset_host + source unless source.include?(":")
source
end
can this be correct? in this line
source = "#{@controller.request.relative_url_root}#{source}" unless %r{^[-a-z]+://} =~...
2009 Mar 26
0
Error On relative_url_root
...n provided by Scott Rutherford.
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[:Current...
2009 May 06
0
Setting config.action_controller.relative_url_root isn't working
Hi everyone,
I''m trying to set the "config.action_controller.relative_url_root"
config value but it isn''t working:
config.action_controller.relative_url_root = "/de"
When i try to view the http://localhost:3000/de page it gives me a
"Routing Error", but if I try http://localhost:3000/ it works
perfectly. Any idea about what this might be?...
2006 Aug 15
0
Using config.action_controller.asset_host with ActionController::AbstractRequest.relative_url_root
...t. I''ve got the lines below in my environments/development.rb
file.
# Enable serving of images, stylesheets, and javascripts from an asset server
config.action_controller.asset_host = "http://assets.example.com"
#make rails think it lives in /app
ActionController::AbstractRequest.relative_url_root = "/app"
When I then include the this code in my layouts:
<%= stylesheet_link_tag ''main'' %>
<%= javascript_include_tag :defaults %>
it produces the following output:
<link href="http://assets.example.com/app/stylesheets/main.css"
media="scr...
2006 Mar 07
0
setting relative_url_root for static files in webrick
Hi,
I am using webrick and want my application not be available on
http://localhost:3000/ but http://localhost:3000/rails.
So I found out I can set
ActionController::AbstractRequest.relative_url_root = "/rails"
in environment.rb.
This works for controllers without further modifications. But for the
static files, I have to put a "rails" directory into the public
directory, and move my static files in there. This was the only way I
found to solve this. But I imagine it should...
2008 Nov 26
3
fckeditor_textarea
...39;,
:width => ''100%'', :height => ''100%''}) %>
where emailcontent is the model(object) name,
and body is method.
but it''s not working,however same code is working in any version below
2.2.2.
The error is undefined method ''relative_url_root''.
Any reason?
Thanks.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group...
2006 Jan 14
2
file_column, ActionMailer, and tests
...be able to get at the URL for the pdf inside my unit tests.
I don''t see how I can use url_for_file_column in this situation.
Doing <%= url_for_file_column "event", "pdf" %> in the actionmailer
doesn''t seem to work (I get a error when it tried to do
nil.relative_url_root[1]). And I also don''t see how I can use
url_for_file_column in my unit tests.
Any ideas? Am I going about this completely wrong?
Thanks,
Joe
[1]
The error occured while evaluating nil.relative_url_root
<snip>
#{RAILS_ROOT}/vendor/plugins/file_column/lib/file_column_helper.r...
2006 Mar 06
7
Set base url?
I have an application running on a Lighttpd instance which is proxied by an
Apache server. It seems to work fine but my urls are incorrect: all urls
reference / which is not where my application runs at the Apache server.
How do I set the base url of a Rails application?
My Apache has the following proxy rules:
ProxyPass /hieraki http://localhost:3001
ProxyPassReverse /hieraki
2008 Apr 20
2
open_id_authentication - authenticate_with_open_id
...with_open_id''
app/controllers/account_controller.rb:33:in `open_id_authentication''
app/controllers/account_controller.rb:12:in `create''
It seems to be failing here, but I have no idea why...
def requested_url
"#{request.protocol + request.host_with_port +
request.relative_url_root + request.path}"
end
I''ve tested to ensure that "username.myopenid.com" is being passed as
the openid_url parameter. Am I missing something else?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups...
2005 Dec 04
3
Relative URL
...ng to use a non default webserver with Rails and succesfully
does this by calling the disptacher directly, by setting the environment
variables: REQUEST_URI and SCRIPT_NAME
My problem is that the relative path is incorrect when I identify myself
as anything else than apache. In request.rb the @@relative_url_root is
only set when the webserver is apache. Is this default wanted behaviour?
Or is there another way of achieving this without settings routes?
--
Posted via http://www.ruby-forum.com/.
2006 Jul 10
7
Rails app in a subdirectory via Mongrel
I''m trying to make Mongrel the default web server for Typo, but I''m running
into a problem. Is there an easy way to run a Rails app in a subdirectory (
http://foo/blog instead of http://foo/) with Mongrel? For most apps, I''d
just change routes.rb to include the prefix that I wanted, but that won''t
really work with Typo--I''d rather not require a few
2007 Feb 08
2
cannot set ENV['RAILS_RELATIVE_URL_ROOT']
i am on lighttpd now, and i cannot set
cannot set enviroment variable:
i added this line to enviroment.rb, but it doesn not work!!
ENV[''RAILS_RELATIVE_URL_ROOT''] = ''something''
links on my page are ok, but all links to images, stylesheets etc are
broken, (because relative_url_root returns ''''), what else can I do?
thanks. f.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-----...
2006 Jul 25
0
Bug in AbstractRequest.path() ?
ActionController::Routes.recognize() to obtain a URI for matching.
If ActionController::AbstractReqeust:;relative_url_root is non-zero length,
then the AbstractRequest::path chops that many characters off the request
URI before returning the new URI.
The problem is that this chopping happens whether or not the URI begins with
the relative URL.
I would expect the method to test whether the incoming URI really beg...
2006 Feb 23
5
Running apps in subdirectories using lighty/scgi
Hi,
So thanks to Zed I was able to get lighty/scgi and a Rails app running.
I know this might not be the best place to post this, but I guessed
there may be several others with similar experiences here.
So, the following step is to have several apps each in its on
subdirectory. I tried the following to no avail:
$HTTP["url"] =~ "^/tango/" {
server.document-root =
2008 Dec 10
12
image_tag cannot show picture
Dear all
I am new to rails.
In view, I place the following code, but cannot show the picture in the
webpage
<%= image_tag("green.JPG") %>
However, I can access the picture in this url
http://localhost:3000/images/green.JPG
The HTML source code generated
<img alt="Green" src="/images/green.JPG.?1228211220" />
I cannot identify the problem. Please help
2006 Mar 07
13
hosting multiple rails apps in one webroot?
It''s actually REALLY easy with lighttpd on linux.
Two apps...
Myserver.com/code/ => /apps/code/
Myserver.com/test/ +> /apps/test/
Each application needs this in the environment.rb
/apps/code/config/environment.rb
ActionController::AbstractRequest.relative_url_root = "/code"
/apps/test/config/environment.rb
ActionController::AbstractRequest.relative_url_root = "/test"
Here''s a lighttpd config file that runs on port 80. Be sure to activate mod_alias!!
# Default configuration file for the lighttpd web server
# Start using ./s...