Displaying 20 results from an estimated 2000 matches similar to: "Accessing Session Object from a model"
2006 Jun 20
1
Extracting a connection out of ActiveRecord::Base
Hi
I''m trying to use the Typo wordpress converter script, but it requires
that the wordpress database is accessible over the connection to the
Typo database.
To get around this, I''m trying to use ActiveRecord::establish_connection
(...) to get a connection object to run the raw SQL queries that Typo''s
wordpress converter uses on. It doesn''t work with Ruby
2013 Jun 10
1
SSHD relative pathing problem
Hi :)
I hope this isn't just a problem in my understanding, but anyway.
I am using `OpenSSH_6.2, OpenSSL 1.0.1e 11 Feb 2013` on an Arch Linux
system, and I got caught out on this error for several days, and I'm not
sure if its a bug for you guys or what.
Anyway, what I noticed, was that when I specifyied a custom HostKey in the
host file or by relative path, that is:
`sshd -Dd -f
2015 Apr 10
3
Disabling of userdb/passdb modules using config statements
Hola,
Debian (and possibly other distros) use the /etc/dovecot/conf.d/* setup
where default config files are stuffed and then one can just add a
99-myconfig.conf et voila, variables are overruled.
This allows the distro to supply updates to the files at package upgrade
time without any/much user intervention.
The problem (for me ;) is that the system comes provided with:
auth-system.conf.ext
2006 Apr 18
2
Connecting to multiple databases with multiple database users
Hi everyone,
I was wondering what the common practice for handling multiple db
users with fine grained privileges on multiple databases is. Against
the often read guideline for rails users to keep with a single db as
"more dbs don''t really make sense anyway", my opinion is that it DOES
make sense to use more than one db schema for a number of reasons that
I won''t
2006 Jun 14
1
compare items from 2 db
I''ve dug thru docs, recipes, wiki, but haven''t found anything quite like
what I''m trying to do..
I have 2 databases with the same tables and same models representing
them. I want to get an item (of same name) from the 2 dbs for
comparison. Now, each example of connecting to multiple dbs I''ve seen
(including from Rails Recipes and the wiki) assumes that
2013 Mar 15
3
advice on module organization
Hi Folks,
Like to get some advice on module organization. I have a system that has a
few different components. One or more components can be installed on a
host. The hosts also have a "type" dimension. This "type" dimension could
(should) ideally be used to configure the system (fill in a bunch of
variables). Problem is, I''m not sure how the best way to do
2006 May 16
2
Dynamically choosing schema using one Model
Hi all,
is there a way in RoR to dynamically set the table to which the Model
must refer to? I''d like to create a sorta "dispatcher" that chooses the
table for the Model based on an HTTP/GET var. To put it in another way
my Model would be fed with data coming from different tables based on
this var passed from the querystring.
Thanks,
Lorenzo
--
Posted via
2009 Aug 03
1
Perl Module Question
To safely make Perl modules from CPAN in Solaris, I used this procedure:
mkdir /opt/cpan
chmod 777 /opt/cpan
chown joe:101 /opt/cpan
PERL5LIB=$PERL5LIB:/opt/cpan
export PERL5LIB
/usr/perl5/bin/perlgcc -MCPAN -e shell
Also, ~/.cpan/CPAN/MyConfig.pm specifically had
'makepl_arg' => q[LIB=/opt/cpan PREFIX=/opt/cpan INSTALLMAN3DIR=/opt/cpan/man/man3],
Does this make sense in CentOS as
2006 May 10
8
dynamic setting of username and password in database.yml
Hello
I''ve now read a lot about application-level authentication in Rails, but
I need to do database-level authentication.
The reason is that my database needs to have the current_user (database
current_user, not current_user defined in an ActiveRecord Model) set to
execute triggers for automatically updating audit tables. So it is not
enough to have a session check against a User
2010 Nov 05
3
Unable to create (and keep) guest
Hi,
Host: CentOS 5.5
Guest: Ubuntu maverick
I am having a horrid time trying to create a guest on my xen machine.
I have tried several method. The method that I have had the most
success with is `xm create`. The problem I have is that once the I
have run:
xm create -c myconfig.cfg install=true
install-mirror=http://mirror.bytemark.co.uk/ubuntu/
install-suite=maverick
and go all the way
2006 Feb 08
4
Fixture question...
Ok, I''m pretty sure I''ve seen this done before. I have a fixture that
isn''t named the same as the table I want to insert the stuff into.
Whats the right way to go about this?!
Google has failed me! :(
-Nick
2016 Aug 30
1
Samba4 Centos 7 - CPU 100%
On Tue, 30 Aug 2016 11:51:35 -0300
Maiquel Consalter <maiquelconsalter at gmail.com> wrote:
> Let me show-you myconfig. Can be the error in CTRL V + CTRL C sorry
> about that
>
>
> /etc/samba/smb.conf
> workgroup = DOMAIN.BR
> realm = CAMPUS.DOMAIN.BR
>
> /etc/krb5.conf
> [libdefaults]
> dns_lookup_realm = false
> ticket_lifetime = 24h
>
2006 Jan 23
1
How to set-up LCR
How to set-up LCR ?
a. which companies can be used with LCR?
b. how to set-up & maintain LCR?
c. multiple connection to one gateway?
Example:
+886223456789 could be reachable via
a. ENUM free
b. Dundi free
c. Voipstunt free
d. Voipbuster free
e. Nufone $
f. Voipstunt $
g. others with 4 concurrent connections $$
h. others with 3 concurrent connections $$
I am looking
2005 Jul 15
0
Queue_log stats
I'm in search of useful ACD type statistics from the queues. Ie talk
time, ratio's, dropped calls etc.
The flat file queue_log is nice, but more useful would be the data in
Postgres or Mysql. Unfortunately the queue module does not yet
support ODBC DB logging (yet). In the meantime this quick and dirty
hack gets the job done.
Replace the flat file with a unix named pipe.
2008 Jul 01
2
[LLVMdev] vmkit on x86_64
Hello,
I'm trying to compile vmkit on a x86_64 linux box with gcc-4.1.2, but
I'm running into troubles because of various problems with casts
between pointers and integers. Is there anybody who succeeded in this
task? Az I see, some of the problems can be fixed with an appropriate
typedef/macro declaration, but in VMCore/JavaObject.cpp some lowlevel
bitmanipulation is used, to mark
2006 Feb 08
10
Sharing sessions between subdomains?
Hello,
I know how to share sessions between subdomains in PHP. Can anyone please guide me as to how I can share sessions using Ruby? Where can I set the value of domain for which the cookie is set?
I would like for a user to login on the home page and then go to blog.home.com and not have to login again.
Any guidance/pointers are appreciated.
Thanks''
2006 Apr 18
7
Connecting to multiple databases
Hi Everyone,
I am trying to connect to multiple databases and followed along the
Recipe in Chad Fowlers ''Rails Recipes'' book (which basically is about
establishing the connection in a subclass of ActiveRecord::Base, and
inheriting all classes in need of this connection from this class)
Chad Fowler says:
"You won''t be able to instantiate an External, of course,
2006 Jan 16
4
Question about self and private
Hi!
There''s something I don''t understand yet about static/private methods. I
hope someone can explain...
E.g.:
class SayHello
def hello(who)
puts "Hello, " + who + "!"
end
def self.say(words)
puts words
end
end
hello = SayHello.new
hello.hello "World" : Hello World!
hello.say "hi" : Error
SayHello.say
2005 May 03
2
How to put a form for one controller in another controlers view
Hello,
If anyone could help me out with this problem I''d appreciate it...
I''m making a database of event bookings, I have an events table and a
clients table. I''d like to include a form to create a new client in the
form for creating a new event.
This would update the parent form with the new client_id using AJAX
methods (see previous e-mail) so you''d
2006 Oct 01
7
Log rotation
Hi mongrel-herders,
I''m just wondering what fellow railsers use to rotate their logs in an
orderly fashion? I''d like to do something lightweight, i.e. (1) rename the
logfile (2, optional) create a new empty logfile and (3) send a signal to
each mongrel in the cluster and have them understand it''s time to reopen
their log file handles. This is what I do with apache and