Displaying 20 results from an estimated 1000 matches similar to: "How to extend rails rake tasks?"
2008 Aug 24
1
avoiding exceptions in views
when rendering a view, if the object being rendered doesn''t respond to a
method it raises an error message.
For example, I have an Employee class and each employee has many Tasks.
So I may call:
<%= employee.tasks.first.task_name %>
If, for some reason an employee has 0 tasks associated with it, the
above template method would raise an exception.
Is it efficient to loop through the
2007 Oct 16
2
Primary Keys enforcement vanishes in test database
I use this naming convention for primary keys:
ActiveRecord::Base.primary_key_prefix_type
= :table_name_with_underscore
I generate the MySQL test database: rake db:test:prepare, and although
the column is there there is no primary key enforcement/index and no
autoincrement (so activerecord saves fail). Is this a bug? What is
the best workaround?
Alan
2004 Apr 02
2
Futzing with TaskScheduler
Hi all,
Thought I should say something - it''s been a little while. :)
Anyway, I''m still futzing with how I want the Ruby API to look. The more I
look at the Perl version, the more I think it was too faithful to the C API.
Right now I''m looking at the trigger() method. For example, I don''t see
any reason to make the "type" key take a hash as an
2005 Dec 30
1
Need serious help - unit testing without a database
I''ve created a model, let''s just call it Person
class Person
attr_accessor :first_name, :lastname
def full_name
@first_name + " " + @last_name
end
end
I''m using this in my Rails application. My Rails application does not
use a database of any kind, and this model is obviously not a subclass
of ActiveRecord::Base. I can''t unit test this
2008 Jun 05
23
unit test question
In development and production, I''ve got postgresql constraints that
prevent deleting a CaseManager if there is a Client that belongs to that
CaseManager.
In unit tests...and obviously in my testing db, those restrictions don''t
get added.
Is it wrong to test for deleting dependent records in unit tests?
Craig
--~--~---------~--~----~------------~-------~--~----~
You received
2006 Nov 10
2
Testing with foreign keys
I''m looking for a plugin/whatever for preloading fixtures, to run
tests with FKs defined.
Specifying load order just doesn''t work for me, I need to purge the
test db, load all fixtures, and only then create the FK constraints.
Any suggestions?
Isak
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
2006 May 09
5
ParaGuest cannot see 30GB memory
Hi,
I have buit Xen (32 bit) with PAE and can start multiple Paraguests with 4 gig memory, but cannot launch a single VM with more than 4 gb memory. I would like to launch 1 VM with 30GB or so memory. Are there any config paramters like kernel,/inittrd that need to be changed.
I have the ramdisk set to the initrd I used to boot xen with PAE.
Thanks
- padma
2006 Apr 03
2
problems testing on 1.1 and postgresql
Hi,
I get errors doing this:
1) createdb myapp_test
2) rake db:test:clone_structure
3) rake test:units
rake aborted!
PGError: ERROR: relation "matches" already exists
I''m using the :sql schema format because there are some problems with
postgres and the :ruby schema format
config.active_record.schema_format = :sql
It seems rake test:units is trying to create the tables
2006 Apr 11
6
Oracle unit test problem in Rails 1.1.2/Ruby-OCI 0.1.14
I''ve upgraded to Rails 1.1.2, and I''m trying to push this change through
to our build server (Linux/Oracle) and we are getting some errors in the
unit tests using Oracle. Looking at the data in the tests reveals a
precision problem. Looking at the tables tells the whole story.
My development database contains this table:
SQL> describe dls_grids;
Name
2007 Jul 05
3
Does puppet have a way to disable a user?
Besides using an exec line with a case statement(to determine the specific os''s disable command), does puppet come with a buit in method to disable a user account?
Thanks!.
---------------------------------
Get the Yahoo! toolbar and be alerted to new email wherever you''re surfing.
_______________________________________________
Puppet-users mailing list
2011 Feb 03
1
RE : a server that offers free icecast includes bandwidth for free
You should contact them on their irc channel , they will open the
mountpoint for you I guess .
Le 3 f?vr. 2011 00:18, Timothy Clark <timothyclark113 at gmail.com> a ?crit :
> how would I get around the code also known as a capsha as I am a blind
> individual.Thanks
> On Wed, Feb 2, 2011 at 6:05 PM, michel memeteau
> michel.memeteau at gmail.com> wrote:
>
2008 Apr 14
2
transport.response is truncated
hi - i have a randon but recreatable problem whereby my
transport.responseText seems to get truncated. I have tried swithcing
btwn onSuccess and onComplete buit it happens on both.
As i said it''s totally random.
any ideas ?
what other info di i need to provide ?
many thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to
2008 May 06
16
Run-Time Error 445
Application: Friend Blaster Pro 10.0.1
Download Link: http://www.addnewfriends.com/download/friendblasterpro_v10_0_1.zip
Wine Version: 0.9.61
OS: Ubuntu 8.04 Hardy
Kernel: 2.6.24-16-generic
Laptop: HP DV9220us 1.6 Dual Core, 2gb Ram, GeFrorce Go 7600
I tried running $ wine friendblasterpro.exe &> /tmp/log.txt 2>&1 and it appears to do nothing, unless the text file it's supposed
2006 Aug 24
26
mongrel logging on win32 platform and win32 service
Hi All
I am using version 0.3.13.3 and since there is no logging support for win32
application. I was wondering if it was possible to get any kind of logging
at all.
I have tried to these two options
1. Stream redirection using "mongrel_rails start -c C:/myspace/snapshot -p
4111 -t 70 -e production -P log/mongrel-1.pid > C:\temp\mongrel-1.log"
The console print the output stream
2009 May 15
2
I simply cannot install R on Ubuntu. I don't know why.
I don't mind using sudo apt-get update/upgrade/install buit I get into
crazy loops (hours) that clearly can't be trusted. But when I use
Synaptic (reload/mark for install R-base) every time I get some list
of things things it want to install as well and syas "Mark" which it
does not do and when I go forward with the Synaptic install of R-base
I get this (and abort) every time:
2009 Nov 02
2
Desktop.ini in Startmenue
Hello,
I've setup a PDC with Samba 3.0.23 and a ldap-backend.
Roaming Profiles are working, but I always have the desktop.ini visible
in some folders of the Windows-Startmenue.
I found several hints for the dos-attributes in smb.conf, buit notthing
seems to work.
Any hints?
Here is my smb.conf:
[global]
workgroup = example
server string = b-login
passdb backend
2007 Jan 06
1
Hosting Music for Free
I would like to be able to host music not by myself for free. The only
problem is, I can't find a place that will do it. When I want to share a
song with a forum, I am currently forced to use RapidShare, MegaUpload, or
UploadingIt, all of which causes problems for somebody. I would like to be
able to host a song, have a link to click on it, and it doesn't have to be
downloaded and cause
2008 Jan 09
2
xapian with MinGW - solved
Hi,
I got this issue nailed out. :-D
The problem was with the zlib package offered by MinGW.
_Never_ use zlib-1.2.3-MSYS-1.0.11.tar.bz2 package, _it's broken_!
Instead, download the pre-compiled version of zlib from zlib.net,
and use that to build Xapian with MinGW on Windows.
Regards,
Adi.
2006 May 24
10
[ADV] Announcing FamilyAnywhere.com
Hello Railers,
At the beginning of this year, I announced Family Connection, an open
source, free, and easy-to-use family website built using our darling
web app framework, Ruby on Rails.
Now it?s available as a hosted, very easy-to-set-up web app called
Family Anywhere! It has the same Family News and Address Book
features as the original, plus a new Photo Album that lets you browse
2011 Apr 08
5
Avoiding a loop
Friends.
I cannot simplify this much, and I think the loop is unavoidable. As a
recovering C programmer I want to avoid loops and in cases like this I
almost allways can by using an apply function. But I suspect in this case
there is nothing I can do.
It is a finance example where a price series is compared to a moving
average. If the price goes above the average, plus a bit, buy the