similar to: catch all error for incorrect urls etc

Displaying 20 results from an estimated 10000 matches similar to: "catch all error for incorrect urls etc"

2006 Aug 04
5
A couple of ferret 0.9.4 exceptions
Hi Dave, I am using ferret at my site http://gifthat.com and I just had a few exceptions pop up. I don''t have a way to reproduce them, but my site just was listed on lifehacker.com and these issues have popped up under multiple concurrent users (only twice though which I think isn''t too bad). I am using two lighttpd instances both with read/write access to the index: 1) Error
2006 May 01
12
pagination in acts_as_ferret
I''m just wondering where I would put the pagination for search results when using "acts_as_ferret". At the moment my search code is.. def search @query = params[:query] || '''' unless @query.blank? @results = Tutorial.find_by_contents @query end end Cheers SchmakO -- Posted via http://www.ruby-forum.com/.
2006 Aug 02
4
Linking to the paginated items from search results.
Using Ferret for searching, I''ve got results that I need to link to. Which is fine, except for that they''re displayed on paginated pages using Rails paginate function - so it''s not like I can''t get it from the database or anything else. Anyone have any ideas on how to go about this? It''s not so much a coding problem as a theory problem, and I
2006 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id'' I have a Model class like the following: class Article < ActiveRecord::Base set_primary_key "ARTICLE_ID" end however, using a link_to like the following (modified scaffolding), the link has no id value: <% for article in @articles %> <tr> <% for column in
2006 Mar 17
4
using ajax and layouts
Hi. I copied the layout-example from agile web dev. in rails. When I want to use ajax to create a search field including <head><%= javascript_include_tag "prototype" %></head> does''nt work when I include the line in my app/views/layout/demo.rhtml. Name of controller is demo_controller.rb. The search-field is in app/views/demo/observer.rthml and I have to
2006 Jul 05
1
Routing via function
I have a route that depends on a username being passed in the URL, such as: map.connect '':username'', :controller => ''user'', :action => ''show'' Is there a way to perform a lookup of the username before matching on this route? I am hoping to be able to do something like this (completely made up): :requirements => {:username =>
2006 Apr 03
6
Installing Ferret locally on TextDrive
I would like to give the 0.9.0 version of Ferret a try on my application hosted on TextDrive. I am currently running on the 0.3.2 version there. Does anyone have any tips on installing it locally there? I know just enough about Ruby gems to get by... but I am thinking it could be as easy as passing a -i flag to specify the install location for ferret. Then, the only thing I am not sure about
2006 May 30
3
Rebuild Indexes Issue
Hi, I have some code to rebuild my ferret indexes but occasionally some stale documents remain in the index even after rebuilding. The only way I could find around this is to manually delete the index files from the filesystem. Here is the code I have for rebuilding one of my indexes for Gifts: # delete existing entries INDEX.size.times {|i| INDEX.delete(i)} gifts =
2006 May 23
2
CSS not applied using apache
Hi all, I have recently configured rails to run under apache. I''ve tried adding a stylesheet using the stylesheet_link_tag function, however when I load the page I do not see the affects of the stylesheet. The URL to the stylesheet looks correct when viewing the page''s source. Has anyone else seen this problem? Thanks for your help, Chris -- Posted via
2006 Jul 31
2
Wizard-like multi-page transaction
Hello Is it possible to create something like wizard with database transactions, so transaction would begin on page one, then on page two, three... etc. there would be some data altered in the database and then on the last page the transaction would be committed or rolled back? thx Zvonko -- Posted via http://www.ruby-forum.com/.
2006 Mar 30
6
Global Method Declaration?
Is there a place where I can put a method that can be accessed in both views and controllers? Here''s the situation, maybe someone can suggest a better way to go about this: I created my own custom login system with email verification and user roles (basically, I tinkered around with SaltedHashLoginGenerator until I finally gave up and wrote my own). One role, of course, is an admin
2006 Jun 29
13
find_by_contents not returning SearchResults?
The acts_as_ferret documentation says find_by_content returns an instance of SearchResults, but I see this error when I try to use the results. undefined method `total_hits'' for []:Array Here is the link to the documentation: http://projects.jkraemer.net/acts_as_ferret/rdoc/classes/FerretMixin/Acts/ARFerret/ClassMethods.html#M000010 But here is the actual code: result =
2006 Jan 19
7
validates_numericality_of positive integer
Hi, What is the simplest way to validate a positive integer? validates_numericality_of :foo, :integer_only => true how do I add the positive part? Do I need another validation statement for pattern matching or do I have to write a validate() funciton for my model? Thanks, Peter
2006 May 04
5
How to install Ferret to get the best performance
Hey all, After dabbling with ActiveSearch, we''re coming back around to take another look at Ferret. ActiveSearch slowed to a crawl after indexing about 20k documents, each 20 lines each. This time we may attempt to create multiple Ferret indexes (isolating each organization''s data individually), since we eventually could have upwards of 20k documents for some
2006 Apr 26
10
save new model with child model
Hi, I am having a problem saving a new model that has an associated child model. If a new ticket is being created and will have one comment to go with it then I tried this in my action @ticket = Ticket.new(params[:ticket]) @comment = Comment.new(params[:comment]) @ticket.comments << @comment if @ticket.save @notice = "Ticket added. Thanks for
2006 Mar 22
14
currency conversion webservice in a rails app?
Hi, I''m interested in using a currency conversion web service in my rails app. Does anyone have a free service that they use and like? I found this one http://www.webservicex.net/WS/WSDetails.aspx?CATID=2&WSID=10 I''ve tried to make a simple, plain Ruby script to connect to this and get a conversion rate without success. How do I integrate a webservice into my rails app? I
2006 Jul 07
5
Can a route require POST or GET? / REST problem with routing
Hi, A store front a customer wants to GET /product/5/show. But for the application this is really GET /cart_item/new/5 or even better /cart_item/new?cart_item[product_id]=5 When the customer clicks add_to_cart they POST /product/5/show so that the url doesn''t confuse the user when any validation errors occur. But for the applicaiton this should be POST
2006 Apr 01
4
problems getting ActionMailer working (on server)
Hi, I''ve read the Agile Rails book''s chapter on ActionMailer a few times. Seems pretty straight forward. Unfortunately I can''t get my application to actually send mail. I uploaded my application to the web server and tried to get a mail message sent. Nothing happened. I looked in the log file and it says Sent mail: From: service@freedomkilts.com To:
2006 Apr 05
7
Archive monthly count for blog
I am creating a blog to learn ruby on rails. from the layout page i pass all the posts as a collection to _archive.rhtml <%= render :partial => "archive", :collection => @archive %> On _archive.rhtml i have access to the collection. I am then gone to render partial another page _archivecount.rhtml to display the number of posts for each month. Can anyone give a clue
2006 Nov 23
2
Segmentation Faults
Hi, I am using Ferret 0.9.4 and my index appears to be corrupt as any attempt to read or write it causes a segmentation fault. I had been using it with minimal problems for the past few months. Is there a way to fix this without rebuilding the entire index? Since I am on a shared host ferret takes too much memory to rebuild these roughly 8500 records in one go and in the past I have had to