I''ve managed to get rails apps working in IIS (even in Virtual
Directories) but I need some help understanding Routes.
When I first had my app installed in IIS, I saw no styles and none of my
links worked.
I had to add this to my environment.rb file:
ActionController::Base.asset_host = ''/myvirtualdir''
So I pulled up my app again and all of the stylesheet links were
rewritten!!!! YAY!!!!. But NONE OF MY LINKS WORKED!!!! Form posts and
link_to tags all were still pointing to ''/''
Alright, I''ve seen this before... this is similar to the problem with
SCGI and subfolders
In order to get my app actually doing anything, I had to use this as my
routes file:
base_dir = ''/myvirtualdir/''
map.connect base_dir + '':controller/:action/:id''
map.connect '':controller/:action/:id''
If I have only
map.connect '':controller/:action/:id''
Then the app comes up just fine, but none of the links work (They are
all relative to ''/'')
If I have only
map.connect base_dir + '':controller/:action/:id''
Then I get
Routing Error:
Recognition failed for "myvirtualdir/login/login"
My question is, why do I have to double-up the routes?? It seems really
inconsistant to me. Why doesn''t <%=start_form_tag %> and
<%=link_to %>
respect the ActionController::Base.asset_host like <%=stylesheet_helper
%> and other helpers seem to?
To the Rails team: What''s the deal here? What needs to be hacked /
fixed
in Routes to make this work on IIS? This seems to be an issue with
Apache + SCGI and subfolders as well.
I would greatly appreciate some assistance with this.
Brian Hogan
Web Development
Learning & Technology Services
Schofield 3-B
University of Wisconsin-Eau Claire
715 836 3585
hoganbp-VnAisaAFmHY@public.gmane.org
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails