Displaying 20 results from an estimated 7000 matches similar to: "QUICK QUESTION: Run a Ruby File inside of Model"
2007 Sep 14
5
controller.expect_render has me beat!
Hi,
A controller has a method with the following
def update
...
if @config.update_attributes( params[:new_config] )
redirect_to :action => :index
else
* render :action => :edit, :id => params[:id] # this line here*
end
...
end
The example has the following
it ''should render the "edit" config url on an unsuccessful save''
2017 Feb 27
2
errors on rebuild
Hello,
I am trying to rebuild an index of 2+ million documents and have not been successful. I am running
Python 2.7
Django 1.7
Haystack 2.1.1
Xapian 1.2.21
The index rebuild command I’m using is: django-admin.py rebuild_index --noinput --batch-size=100000
The rebuild completes but an immediate xapian-check returns this error:
xapian-check ./archive_index
record:
baseB blocksize=8K
2008 Jul 07
3
yum-updatesd not working on CentOS 5.2
Dear Srs,
yum-updatesd-0.9-2.el5 appears that it's not working on freshly
installed CentOS 5.2, using:
# rpm -qa "yum*"
yum-metadata-parser-1.1.2-2.el5
yum-updatesd-0.9-2.el5
yum-3.2.8-9.el5.centos.2.1
yum-fastestmirror-1.1.10-9.el5.centos
I see some bugs ([1], [2] and [3]) in the bug tracker, and more info
related to other distros like Fedora, etc.. with the same problem.
2007 Oct 19
1
Size and performance efficient rewriting of the `dash.test` built-in
== Proposition A. Do not implement `-a' and `-o'. ==
Why.
1. Most of the `test` usage is 2 or 3 arg. ops.
2. Issues (and possible `||', `&&' substitutions), described in [0]
[0] http://www.opengroup.org/onlinepubs/000095399/utilities/test.html
3. In case of usage of it, `exec /usr/bin/test $args` can be
implemented. Thus, smart users of `-a' and `-o' will
2017 Mar 02
2
errors on rebuild
Hi Olly,
Thanks for the detailed response. I hadn’t realized there was a new xapian haystack backend. I’m going to try that but I have some upgrades to do first. Django 1.8, etc.
Thanks,
Ryan
> On Feb 28, 2017, at 3:40 PM, Olly Betts <olly at survex.com> wrote:
>
> On Mon, Feb 27, 2017 at 10:29:46AM -0800, Ryan Cross wrote:
>> I am trying to rebuild an index of 2+
2006 Oct 13
2
form_for() and name
how can i give name attributes for form_for(), so it will give an output
like <form name="f">. it is because that i need to access the form name
for javascript manipulation.
as far as i know, name can only used in form_tag(), but i currently have
more than 50 forms that built using form_for(). the structure is like
this:
<% form_for symbol, item,
:url => { :action
2002 Jul 07
2
wins.dat to DNS
Hi,
I'm wondering how to setup my DNS server (BIND 9.1.1) to read a zone from my wins.dat file. Is there a script I can use, or is there some other way to do it? I'm a linux newbie so a lot of info helps!
Thanks,
Jeff Nichols
-------------- next part --------------
HTML attachment scrubbed and removed
2006 Apr 06
4
function onComplete how to overload?
Hi all. I my apps I need to use Ajax.Request Object. One of the object options is onComplete fuction which looks like this:
funcion onComplete (originalResponse)
{
..some operations
}
I need pass to function one more parameter, how to do it? is is possible? I can''t use AJAX Updater because result of Ajax Call is uploaded to the div that I defined earlier, and in my situations I
2017 Feb 28
0
errors on rebuild
On Mon, Feb 27, 2017 at 10:29:46AM -0800, Ryan Cross wrote:
> I am trying to rebuild an index of 2+ million documents and have not been successful. I am running
>
> Python 2.7
> Django 1.7
> Haystack 2.1.1
> Xapian 1.2.21
>
> The index rebuild command I’m using is: django-admin.py rebuild_index --noinput --batch-size=100000
> The rebuild completes but an immediate
2007 Aug 01
3
yum-updatesd.conf on centos 5
Hi All,
I am running CentOS5 . Yum pkg was installed by deault fresh installation.
pls see below for installed yum pkgs.
[root at mailgw ~]# rpm -qa |grep yum
yum-updatesd-3.0.5-1.el5.centos.2
yum-3.0.5-1.el5.centos.2
later, I installed below pkg for protection.
yum-protectbase-1.0.4-2.el5.centos
Now, everything works. But, in this vershion of yum, It has no crontab
running. It has a file
2015 Nov 11
0
[PATCH] builder: Make the interface between cmdline.ml and builder.ml explicit.
---
builder/Makefile.am | 1 +
builder/builder.ml | 69 +++++++++++++++++++++++++----------------------------
builder/cmdline.ml | 37 ++++++++++++++++++++++++----
builder/cmdline.mli | 44 ++++++++++++++++++++++++++++++++++
4 files changed, 110 insertions(+), 41 deletions(-)
create mode 100644 builder/cmdline.mli
diff --git a/builder/Makefile.am b/builder/Makefile.am
index 6742822..993cc7b
2005 Sep 23
1
Sortable list with Ajax and delete function - working example
Hi.
I read most of the postings here but unfortunately I didin''t found a complete example which could be used. Of cource the ones who are professionals in javascript could implement the missing peaces from the puzzle.
What I''m required to do is a tree (sortable list) where items can also be deleted and at each modification a function (ajax) is called to save the changes. For
2017 Mar 25
0
errors on rebuild
Hi Olly,
After upgrades my stack is now:
Python 2.7
Django 1.8
Haystack 2.6.0
Xapian 1.4.3. (latest xapian haystack backend with some modifications)
Using the same rebuild command as below but with —batch-size=50000
The issue has now become one of performance. I am indexing 2.2 million documents. Using delve I can see that performance starts off at about 100,000 records an hour. This is
2014 Mar 10
2
[PATCH] builder: complete architecture handling
Add the possibility to choose which architecture use to build the wanted
image (--arch). Since this implies that running commands on the guest is
usually not possible when the architecture is different than the host
one, another new option (--allow-foreign-arch-ops) allows to run
commands nevertheless.
The caching scheme is adapted to account for the architecture (with
--print-cache showing the
2006 Feb 28
0
Rolled my own alternative to trigger function with OLD/NEW
Back with PostgreSQL, I just inspected OLD and NEW in trigger functions.
I came up with this alternative in Rails:
class Item < ActiveRecord::Base
def active=(value)
self.set_old(''active'', self.active)
write_attribute(:active, value)
end
def after_update
if !get_old(''active'') and self.active
Notifier::deliver_item_approved(self)
2006 Mar 21
16
Javascript Code inside an Ajax response
Hi, i wish to run a function that came inside my Ajax response. I read
that i have to use the evalScripts to make this, but still i couldn''t
make it work. The error said that my function isn''t declared. I look
at the Sergio Pereira tutorial about use the var xxx = function() but
still doesn''t work.
Someone could help me?
In the response this is the code:
for (var i =
2007 Jan 29
0
Rails trunk breakages
Anyone else having an issue with route-generation in specs breaking as
of Rails trunk r6062? When I run my specs at r6061, they all pass, and
in 6062 I get a trace like this every time my controller generates a
route:
TypeError in ''Requesting /artists/1 using PUT should redirect to the artist''
can''t convert Fixnum into String
(eval):19:in `artist_url''
2008 Feb 25
0
Yum-updatesd not functioning
I have a couple of CentOS 5.1 boxes, mostly i386, but a couple x86_64,
some real, some virtual.
On all of them, I have yum-updatesd configured to emit via email to
root. Here is a sample yum-updatesd.conf from one of them:
[main]
# how often to check for new updates (in seconds)
run_interval = 14400
# how often to allow checking on request (in seconds)
updaterefresh = 600
# how to send
2007 Apr 26
3
What to use to do an action every minute?
Hey,
I need to have a process running that will do something every minute
(check value of some stuff). Is there something in Rails that I can use
to do this?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send
2008 Dec 11
6
yum-updatesd or similar for CentOS 4
Hello,
we have enabled yum-updatesd on our dozen real
and virtual machines running CentOS 5.2 some time
ago and are very satisfied:
afarber at ablsw01:~> grep -v ^# /etc/yum/yum-updatesd.conf
[main]
run_interval = 7200
updaterefresh = 1200
emit_via = email
dbus_listener = no
do_update = yes
do_download = yes
do_download_deps = yes
(it would be good to make it use the proxy though...)
My