similar to: How to run a cpu intensive ruby script with rails functionality

Displaying 20 results from an estimated 1000 matches similar to: "How to run a cpu intensive ruby script with rails functionality"

2006 Oct 12
2
Too Many Mysql connections
In my app, for three models: foo,bar and baz, the database connection is made to a different database and hence in model code: class Foo < ActiveRecord::Base establish_connection :diff_database end class Bar < ActiveRecord::Base establish_connection :diff_database end class Baz < ActiveRecord::Base establish_connection :diff_database end Now, the problem is, if is use the above
2009 Mar 17
11
Refactoring module
Dear all Please see the following module, In module SX3 SX4 and SX5 have similar class Tasklist, but inherit from different class. I will use the following code to connect to different data sources RemoteSX3Model.establish_connection sx3_hash RemoteSX4Model.establish_connection sx4_hash RemoteSX5Model.establish_connection sx5_hash How can I refactor my code in module to look simpler? Thank you
2006 Jun 26
1
Separate Read and Write Database
Hello, I need to access an mirrored database with one read and one write cluster. Is there a way to tell a model to use two connections? So that all updates etc go to the write database and all read from the read one? This is a fixed set up I can not use MySQL 5.x stuff and additionally i get a token on write, which can be checked on read (and wait for replication) if new data is needed. I
2007 Oct 12
6
abstract_class... what exactly does it do
Hi, Does anyone know much about abstract_class? Does it actually prevent instances of the class from being created? Does it disable certain methods? I already know what it''s for, but I want to know what setting self.abstract_class=true actually does. The reason I ask is that I want to use it for a slightly unorthodox purpose. I want a class who''s only attributes are its
2010 Jan 26
6
Subclassing ActiveRecord::Base
First of all, sorry for the crossposting, but I put this into the Ruby Forum first of all, but was pointed to this as a more appropriate location. I''m using ActiveRecord and ActiveSupport in a non-rails environment to connect to multiple databases, and I''ve found the following (single database) to cause me an error. Note that params is my database settings and omitted for
2006 Jul 05
2
Serialized object behaves weird
Hi! I got a class named EinsatzFilter which I serialized to session. Before saving to session it works afterwards I keep getting the message: "undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from ActiveRecord::Base inherited class. Code: class EinsatzFilter include ApplicationHelper attr_reader :personen, :monat, :projekte, :kunde
2006 May 04
1
Multiple database problem in rails 1.1 ?
Hi ... We are constructing at rails GUI using two differant databases, and this seems to work out nicely using a "establish_connection" per model, where each model enherit directly from ActiveRecord::Base. But ! I like to use a model where we can inherit from one parent class that handles the connection exactly as descripted in this document :
2007 Nov 29
2
railroad-database problem
Hi all, I am facing with a new type of problem with railroad, explained below 1. I am using an oracle database in my application. In the database.yml file, I am having different schema connections to the same database.like development: database: real_database username: schema_name1 password: ************ adapter: oracle abcd_development: database: real_database
2019 Feb 10
1
Issues with using Samba share from Mac OS
I am an old UNIX and Mac hand but new to samba. My ultimate aim is to use a samba share with Time Machine. I have built an up to date version of samba (4.9.2) which has the necessary support for Time Machine and installed it on my linux system (ubuntu 18.04), and I have it sharing a volume which I can mount from my Mac. A good start ;) The problem is that I get permission errors whenever I try
2018 Sep 20
2
4.8.5 + TimeMachine = Disk identity changed on every connect, cannot backup
Hi, I configured Samba 4.8.5 on Debian (Buster) with vfs_fruit as a TimeMachine destination and while it detects it and does the initial backup to some extent (30GB out of 200GB), TimeMachine then fails with a message about the disk identity having changed. Options are “don’t backup” and “backup anyway”. When using “backup anyway”, the backup creates a secondary sparse image and starts from
2019 Sep 18
3
Change in behaviour for the "%U" substitution in 4.10.8?
I have now - the 'net view' output is now sensible, and reports "Time Machine for gac" (which is the expected comment). But in log.smbd, it is now looking for a folder called "/backups/timemachine/DOMAIN\username" so access to the share itself is still not working 18 Sep 2019, 11:54 by samba at lists.samba.org: > Have you tried to replace?%U in the path
2018 Sep 24
3
[Announce] Samba 4.9.1 Available for Download
======================================================== "By failing to prepare, you are preparing to fail." Benjamin Franklin ======================================================== Release Announcements --------------------- This is the latest stable release of the Samba 4.9 release series. Major enhancements include: --------------------------- o s3: nmbd: Stop
2018 Sep 24
3
[Announce] Samba 4.9.1 Available for Download
======================================================== "By failing to prepare, you are preparing to fail." Benjamin Franklin ======================================================== Release Announcements --------------------- This is the latest stable release of the Samba 4.9 release series. Major enhancements include: --------------------------- o s3: nmbd: Stop
2019 Feb 14
4
Issues with using Samba share from Mac OS
> On 11/02/2019, at 10:02 AM, Rowland Penny via samba <samba at lists.samba.org> wrote: > > On Mon, 11 Feb 2019 09:14:03 +1300 > Russell Fulton via samba <samba at lists.samba.org> wrote: > >> I am an old UNIX and Mac hand but new to samba. My ultimate aim is >> to use a samba share with Time Machine. I have built an up to date >> version of samba
2008 Dec 09
7
subclassing vs mixins, which one should be used?
Hey all, I have two models in my rails project that share a lot of traits. They each have the same 4 properties, and now I need to add 2-3 methods to each one that will be the same. In the spirit of DRY I am looking for a solution to write these methods only once. Both of these models already inherit from ActiveRecord . . . and I didn''t know if it was safe to just "whip up" a
2006 Mar 28
12
cached-model broken with Rails 1.1
It looks like cached-model is broken again under rails 1.1. Can anyone confirm? Note that the exception below indicates it''s trying to treat CachedModel as the class name of the model, rather than using the proper class name (which is Entry in this case, and the table called entries). This is a model using Single Table Inheritance and acts_as_tree, and worked just fine under 1.0 and
2018 Sep 24
3
Debian Stretch AMD64 only, Samba 4.9.1 Available TESTING
Hai Daniel, Yes yes.. As you can see in my change log. ( found here, http://downloads.van-belle.nl/samba4/Buildlogs/stretch-experimental/ ) >From my changelog. samba (2:4.9.0+dfsg-1.1nmu~deb9) stretch; urgency=medium . * Non-maintainer upload. * Rebuild from Debian stretch from Debian Experimental * Bump build-depends cmocka 1.1.2 * enabled --enable-spotlight to make TimeMachine work
2019 Sep 04
4
Samba, Time Machine, and ADS
Dear all; I?m running smbd 4.9.5-Debian and I?m struggling to get Time Machine support to work. The server is running Debian Buster, and the client is macOS High Sierra. I can mount the share just fine on its own, but as soon as I tell Time Machine to ?Back Up Now?, it says ?Preparing Backup,? ?Looking for Backup Disk,? and then nothing. The little red exclamation mark tells me that "The
2016 Oct 09
2
Mac OS Timemachine over SMB
Is it possible to backup Mac OS devices through a Samba share on Samba 4.4.6 on Fedora 24 with Time Machine? I am able to successfully advertise the share through Avahi, connect to it in Finder, and read/write files. I am also able to see the share as a destination in Time Machine, but selecting it shows an error that "The selected network backup disk does not support the required
2007 Sep 29
8
Inheritance problem in model
Hello, I''ve got a problem with the inheritance as soon as I try to use it in a model. I''ve got plenty of items which can share a lot of code, so I created a class "Item", which inherits from ActiveRecord::Base, but because it''s not a "real item" but an interface, I set it abstract (writing abstract_class? method). Then I have all the differents