Displaying 20 results from an estimated 10000 matches similar to: "Routing in Rails"
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
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
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 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''ve
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 works great.
2006 Aug 31
2
Url rewriting for random urls
Hello,
I have discovered the good use of stylesheet_link_tag and
javascript_include_tag (I''m still learning) and it is very useful because I
have to use the relative_url_root way.
Now I wonder how I can use that for other URLs. I want a background image
for a table cell so I have to write something like:
<td align=''right'' valign=''bottom''
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
2006 Jan 13
2
FastCGI problems
I''m having a lot of problems with my Typo install. My fastcgi fails horribly
after a reboot:
[13/Jan/2006:16:55:28 :: 19796] Dispatcher failed to catch: (Interrupt)
/usr/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each''
/usr/lib/ruby/site_ruby/1.8/fcgi.rb:597:in `each_cgi''
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in
`process!''
2009 Jun 25
8
Mongrel service keeps re-starting ruby
On Thu, Jun 25, 2009 at 2:07 AM, Michael Pliskin<mike at comapping.com> wrote:
> Hi all,
>
>
>
> Some disclaimer first: I am a complete newbie in mongrel and this list, so
> please forgive me if I say something weird. I have a problem, I?ve googled
> for a solution for quite a while and failed so far, so decided to ask here.
>
>
>
> I am trying to set up my
2006 Jun 21
3
multiple apps one virtual host one domain
I''m trying to achieve the following:
Having a development server that runs multiple rails apps running wihout
creating a different virtual host for each apps.
my documentRoot is therefore /var/rails for my whole config
http://myserver/app1/controller/action -> (/var/rails/app1/...)
http://myserver/app2/controller/action -> (/var/rails/app2/...)
I''m under apache 1.3
mod
2006 May 24
1
Rails App in Subfolder = Routing Error Recognition Failed
Zed / List,
On my workstation I''m running lighttpd 1.4.11 and mongrel 0.3.12.4. Here are
my proxy settings:
proxy.debug = 0
proxy.balance = "fair"
proxy.server = (
"/RailsAppSample" => ((
"host" => "127.0.0.1",
"port" => 1337
)))
I can access http://localhost/ (default lighty welcome page) and
http://localhost:1337/
2006 Jun 22
2
[PLUGIN] url_for_with_prefix - allowing you to modify/remove prefixes easily
Here''s the readme. I think it''s okay to post this kind of thing to
the mailing list. Anyway, hopefully someone else finds this useful.
UrlForWithPrefix
================
By Pat Maddox
Very simple plugin, adds the :prefix option to url_for.
Say in your environment.rb file you''ve got
ActionController::AbstractRequest.relative_url_root = "/super"
Any time
2006 Mar 06
4
Apache 2.x: Use fcgid or Mongrel?
Hi, There''s lots of stuff going on currently with choices of production
deployment environments. But I''m not clear on a few things as I need to
decide on a production setup where Apache is a given.
A recent thread (http://www.ruby-forum.com/topic/56590) seemed to favor
Apache 2 with mod_fcgid. And this is supported in articles such as:
2005 Dec 04
3
Relative URL
I''m trying 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
2006 Mar 12
5
Authentication and authorization of static content
Hello,
I''m a Java programmer looking to make my life easier. Thus, I''m
considering using Rails for my next project. I''ve read chunks of the
Agile book and it looks like authorizing users at the Controller level
is dead easy to do. However, I have a need to password protect static
content in my site. In the J2EE world, I would use a servlet filter to
intercept
2005 Dec 14
3
Multiple rails apps to appear as one app
Hello everyone,
I have a problem concerning two rails apps, which I can''t seem to solve.
I already tried the Ruby On Rails IRC channel. I also started a thread
at the Site5 forums:
http://forums.site5.com/showthread.php?t=6682
As is described in
http://wiki.rubyonrails.com/rails/pages/HowtoDeployMoreThanOneRailsAppOnOneMachine
, I would like two separate Rails applications to
2006 Feb 16
4
Lost while trying to deploy rails app on apache
I need to graft some rails apps onto a website running apache 1.3 and
I must be missing something very obvious because I cannot get things
working properly. Here is what I need:
1) The server must be running apache 1.3. A very large body of PHP
content is currently vended by the server through 5 vhosts and I have
neither the time nor resources to replace apache1 with apache2 or
lighttpd. Maybe
2006 Feb 16
11
Multiple Rails app on the same server?
I have a rails app on a debian server running lighttpd and I''m trying to
set up typo so that it also works (with a different url). I have 4 URLs
running -- let''s call them foo.com, bar.com, www.typo.com and
php.typo.com
I am starting lighttpd by going into the directory where my foo.com app
is and typing either ruby script/server or script/server -e production
-- either
2006 Mar 11
6
develop multiple apps simultaneously how?
Hi,
I am very early into reading the "Agile Web Development with Rails"
book, so this will be a very basic question:
I tried starting another app simultaneously with the "depot" app, but
when I, after creating the database and the stub project try to start
the server, it tells me that the port is in use (of course it is, by the
depot application!). Can I tell the server
2006 May 08
10
Apache 2.2, ProxyPass and HTTPS
Hi all,
I''m currently trying to get Mongrel running my app whilst fronted by
apache 2.2 in a sub-directory via https. A bit convoluted I''ll grant
you but necessitated by existing systems.
The pertinent parts of my httpd.conf:
<VirtualHost 123.123.123.123:12345> #historic choice of random port number
DocumentRoot /var/www/admin
ServerName admin.example.com:12345