similar to: Running setup code after boot

Displaying 20 results from an estimated 20000 matches similar to: "Running setup code after boot"

2006 Aug 11
6
Running some code right before the app is available to users
I do some indexing using acts_as_ferret in a rails app. I need to do some preloading of the index''s sort fields so that the first request that sorts doesn''t take 5 minutes to complete. I tried sticking my preload code in config/environment.rb and that worked but it gets ran in rake migrations, tests, etc, when it''s not really needed. Is there anything specific to
2006 Jul 05
10
Scalable alternative to #find_all
Is there any scalable alternative to iterating all the records of a certain model? #find_all seems to load everything into memory. With 500.000 records it will be a swap storm. Pedro.
2006 Aug 01
8
Problem importing lots of records
I run a script that imports a few thousand records into the database. The script runs once for each of several XML files. What it does is parse the XML and for each element of a certain type creates a record in a rails database that gets indexed with acts_as_ferret. This worked fine before but today after a few files (70000 records) this started to happen for any file I tried:
2006 Jul 31
16
Sorting performance
I''m using acts_as_ferret to index one of my rails models. Right after I start the app the first request that orders by some ferret field will take very long. Subsequent ones seem to be fast. I guess some caching is going on. Any tips on solving this? Pedro.
2006 Jun 01
1
Using acts_as_ferret outside rails
How do I use a model that has "acts_as_ferret" defined outside rails? I''ve tried adding this to the top of my model: require "#{RAILS_ROOT}/vendor/plugins/acts_as_ferret/lib/acts_as_ferret.rb" and then defining RAILS_ROOT and RAILS_ENV in my app that uses the model outside rails. That got me this exception:
2006 Aug 25
7
disabling automatic indexing in acts_as_ferret
I''d like to be able to enable/disable the automatic indexing of documents acts_as_ferret does. Something like MyModel.disable_indexing MyModel.enable_indexing would be perfect. I need this because I do some indexing that requires visiting the parents of the model objects and my import method imports the children first, so the information isn''t there yet. I''d like to
2010 Feb 20
2
Problems accessing a file share using kerberos
Hi, I'm trying to access a file share on what I believe is a netapp server using kerberos authentication. I've done a kinit and gotten credentials and then ran: $ smbclient -U pedrocr //gsb-filer2/pedrocr -k -d10 This actually increased the number of credentials klist shows so looks good in that regard. Howeever, I got the error: """ SPNEGO login failed:
2006 Jul 13
10
Problem with flashes staying on between pages
I have a login page that redirects to itself if the login is incorrect. The browser does: get login post login, with wrong username and password redirect back to login When the post action redirects back to login it sets a flash telling the user it failed. So far so good. The problem is that if I get another page after that, the flash is still there. It only disapears on the second.
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 =
2012 Feb 22
3
Automatic configuration of direct routes behind NAT
Hi, I've followed the guide at: http://blogs.operationaldynamics.com/andrew/software/research/using-tinc-vpn and have a working tinc VPN. Here's my topology: - CentralNode has a fixed public IP address that everyone connects to - Leaf1 and Leaf2 may have different IP addresses depending on where they are, and usually those will be behind NAT (think, two laptops going around and you get
2006 Apr 27
1
Ferret crashing Ruby
I''ve gotten several problems with C ferret crashing ruby. Here''s the stack trace of my latest case: #0 0x00000050 in ?? () #1 0xb74028ab in iw_close (iw=0x8685a40) at index_rw.c:947 #2 0xb7414359 in index_destroy (self=0x829ebc0) at ind.c:89 #3 0xb73f00bc in frt_ind_free (p=0x829ebc0) at r_search.c:1564 #4 0xb7f04dca in rb_gc_call_finalizer_at_exit () from
2014 Dec 28
5
Current state of Tinc 1.1?
On Mon, Dec 22, 2014 at 9:30 PM, Guus Sliepen <guus at tinc-vpn.org> wrote: > Although the cryptography is now separated from the rest of the logic in > tinc, it is not really replaceable, since only OpenSSL is supported. > However, there is also a new protocol in tinc 1.1, which uses Ed25519 > and ChaCha-Poly1305. The code for those algorithms is included in tinc, > so the
2006 Aug 18
3
RJS templates for DOM manipulation
I want to do some DOM manipulation with JavaScript. Specifically I want to implement zoom in/out in a picture by changing it''s width/height attributes. Is it possible to do this using RJS or should I write javascript by hand? All the examples of RJS I''ve seen write the javascript in the result of an AJAX remote call. Where are the docs for RJS? All I''ve seen are blog
2006 Jul 11
1
Saving a request in the session
I have a filter that checks if the user is logged in and goes through the login process if he is not. I''d like to store the complete request in the session so that I can then replay it exactly, allowing for post/get to both work. Is this possible at all? Pedro.
2006 Nov 04
1
Calibrating the Battery on an MGE Ellipse Premium 1200
My new MGE Ellipse Premium 1200 is now working fine. I've tested pulling the plug and the computer shuts down properly and comes back up when I replug. The only strange behaviour is that when I put the power back on the battery shows as being at 86%. If it was at 86% it should have lasted longer. Is there any calibration step I can do? The only commands the ups seems to support are: $ upscmd
2006 Feb 17
7
Rich Text Editor (RTE)
Hello, We are developing an commercial application that need to use an RTE. Someone know one RTE editor that can I use in an commercial application? We need basic functions to format paragrapher, bold, italic, ... I found FCKEditor but it is very expensive and weight. I found this list too but don''t know what is trustful: http://www.geniisoft.com/showcase.nsf/WebEditors Some
2006 Nov 16
6
FreeBSD 6.1, MGE Ellipse ASR600USBS, newhidups & upsd
Hello, I'm facing problems as I'm installing NUT to monitor a MGE Ellipse ASR600USBS on a FreeBSD 6.1 box. UPS is recognized as : ugen0: MGE UPS SYSTEMS ELLIPSE, rev 1.10/42.41, addr 2 I'm temporarily using root profile (devfs/devd scripts not modified atm). newhidups starts & runs fine (unplugging mains makes newhidups outputs lots of data when started with -DDDD flags)
2006 May 05
3
Sorting by score
I''m trying to sort by score but it seems like SortField::SortType::SCORE is 0 instead of a SortType. A test case is attached. Without the C extensions the test passes, so I guess it''s a bug in them. Should I be using it without the extensions? Because if that''s the case I have some other bugs to report. Greetings, Pedro C?rte-Real -------------- next part
2006 Apr 21
3
Sorting Search results
I tried sorting the search results in Ferret::Index::Index#search and what I found was that the sort is applied not to the whole search but to the returned results. Suppose I have these results: Text - Num foo - 2 bar - 3 far - 4 boo - 1 If I limit the search to the first two and sort by num I get: foo - 2 bar - 3 while I think the natural behaviour would be: boo - 1 foo - 2 Is this
2006 Nov 02
1
MGE Ellipse Premium 1200 USB cable only works if plugged after boot
I have an MGE Ellipse Premium 1200 that I connected to my server using its USB cable. Nut seems to be working fine. I've done a power down test and it worked and came back up when the UPS had power again. I'm using the newhidups driver and the USB cable. The problem I'm having is that if I boot with the cable connected newhidups says it can't find the UPS. If I unplug and plug in