similar to: Routing to a static resource in Mongrel

Displaying 20 results from an estimated 20000 matches similar to: "Routing to a static resource in Mongrel"

2006 Sep 25
2
Managing requests for static content in WEBrick and Mongrel
All, Is there a way to set things up so that requests for static files in either WEBrick or Mongrel will just cause a regular HTTP request and not cause the dynamic routing-based invocation to occur? I had an issue where a request for a missing .js file was causing another request to be registered, thus blowing away my flash data. I tried to do this in my routing file, but I don''t
2008 Jan 11
26
Mongrel doesn''t start under Rails 2.0.2/Win XP
All, Mongrel 1.1.3 Rails 2.0.2 Ruby 1.8.6 Windows XP SP2 When I issue the command "ruby script/server" from any of my Rails projects on v. 2.0.2, I get a Windows dialog with the error: "The application has failed to start because MSVCR80.dll was not found. Re-installing the application may fix this problem." I''ve gone through the process of attempting to introduce
2006 Apr 26
2
Routing to a static HTML file under RAILS_ROOT
I have a regular plain old static HTML file under my RAILS_ROOT that I would like to serve as itself (without any dynamic anything). How can I write a route to "pass the request through" succesfully. I tried map.connect ''path_to_file'', :controller => nil, :action => nil, :id => nil but that didn''t work. Also, note that I have this route
2008 Jan 11
8
How do you run WEBrick under Rails 2.x?
It appears that Mongrel is now the default development server for Rails as of 2.x. I''m assuming this because I''m unable to run Mongrel (for reasons I don''t totally understand yet - I am running Windows and I keep getting asked for MSVCR80.dll which is a _64 bit_ dll on my Win XP machine) and if I issue ruby script/server, I see the same errors that I get when I try to
2007 Oct 16
1
redirects with mongrel (dropping the www. from a url)
Hi All, I have a rails app running on an apache virtual host with mongrel that i want to set up a redirect from www.someapp.com to someapp.com (dropping the www.) I have tried doing this in apache using a rewrite rule (below) which worked before when the app was written in php. Redirect http://www.soccertackle.com/ http://soccertackle.com RewriteEngine on RewriteCond %{HTTP_HOST}
2006 Apr 11
2
class level "static" code in controller object not working
All, I have the following code that I put in my controller which I am using to initialize some static data. Note that it is not contained with a method of any kind. puts "test" config = YAML.load_file("config/config.yml") if config.nil? Dir.mkdir(config[''html_upload_folder'']) unless File.exist?(config[''html_upload_folder'']) I
2006 Jul 03
2
Routing acting strangely - mixed case controller names fail?
All, I have a link that used to work but now generates a routing error. The link URL is a straightforward controller/action/id and of course, I have map.connect '':controller/:action/:id'' in my routes.rb file. When I click on this link, I get a routing error. What''s potentially interesting about this URL is that the controller name is mixed case. Class is
2006 Aug 10
3
Want to use a view helper (TextHelper) in a model class
I have a model that deals with HTML and I want to use the text_helper.sanitize method to strip the HTML of Javascript. However, it doesn''t appear that I can get easy access to the text_helper methods from within a model. Anyone have any suggestions for how to do this? In general, I think that there are some ActionView helpers which are generic enough to want to use in a model class.
2008 Feb 21
9
Difference between nginx and mongrel
Hi, I could never find out what''s the difference between nginx and mongrel. All my searches say "nginx is a HTTP server ..." and "Mongrel is a fast HTTP library and server for Ruby....". For me they both mean "...HTTP server...". I kept up with this question for some time till I came across this santence from the guys at Friend for Sale: -----------------
2006 Mar 22
2
How to bypass routing for a particular request?
I would like to set up some my app. to display a standalone HTML page - not rendered through RoR per se. Something like render(:inline => some_Javascript_function... then in the Javascript some_Javascript_function, I want to open up a popup with the URL I specify. However, because it is a relative URL, it is going through the RoR routing algorithm. I don''t want that - can I
2006 Jul 03
4
text_field doesn''t call overridden ActiveRecord getters
All, In a template, I have <%= text_field :target_list, :DateReceived, { :title => ''uploaded_at'', :class => ''target_list_info'', :disabled => ''true'' } %> Here is the DateReceived method on my
2006 May 30
5
Implementing HTTPS with WEBrick?
All, I would like to test some secure pages that I''m developing in my WEBrick-based development environment. I''ve done some research and it appears that I need to create a new command that will start a HTTPS based WEBrick server. Is this correct? Also, it appears that the https.rb module is not included with the WEBrick bundled in Rails. So, I will need to go get that
2006 Mar 27
3
regular expression matching in routes.rb
All, I have a route specified as: map.connect '':folder/:filename'', :folder => /htmlfiles/, :controller => "eSimply", :action => "preview_HTML" I expect it to invoke the "preview_HTML" action in the "eSimply" controller. Given an argument of "htmlfiles/xyz.html", it keeps saying that it can''t find an
2006 Jun 27
5
Can''t call public application.rb method from ERb template
All, I have a left navigation partial that I want to dynamically generate CSS classes for based on the current controller action. In my ERb template, I have <DIV class="<%= get_menu_display_style(''login_form'') %>"> In application.rb, I have the method get_menu_display_style defined as: public def get_menu_display_style(action_requested)
2006 Jul 13
5
Generic page element display initializer in a layout?
All, I''ve run into a snag. I need to handle the display of elements on my page and I want to use my Javascript event handlers on page load. However, my BODY tag is trapped in my generic layout. I''m thinking that I can put an onLoad on the BODY tag that will just call a Javascript method called initializePage() and then provide this initializePage() call in my specific page
2006 Mar 22
6
Relatively easy HTML/XML parsing utilities?
Anyone know of any Ruby modules which can be used to parse an HTML page ? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2006 Aug 09
3
Deployment: Segregating static files from RHTML
All, I am deploying on a production system using Apache/fastcgi. I would like Apache to take care of all of my static files and dispatch.fcgi to take care of all of my Ruby templates. In order to achieve this separation, do I need to set up two vhosts in Apache, one to serve static content and one to serve dynamic content? Has anyone done this in production and can point me to the right
2006 Jul 10
8
Setup new data in the test database _after_ unit test runs
All, I want to run automated unit tests as part of my build. I am building to my test environment. Upon successful completion of all of my unit tests, I would then like to load some data (using a fixture, I imagine) into my test database that will act as fresh "system test" data for my users to play with. What is the best way to "load the standard system test/user acceptance
2006 May 25
5
Setting a global before_filter action in application.rb
Can you set a global before_filter action in application.rb? So, for example, you could control authentication for all of the controllers in an app.? Obviously, you would need a way to reference actions by controller within this "global before-filter". Thanks, Wes -- Posted via http://www.ruby-forum.com/.
2006 May 01
4
URL encoding in Rails?
Simple question: How does one do URL encoding in Ruby/Rails? Thanks, Wes -- Posted via http://www.ruby-forum.com/.