Displaying 20 results from an estimated 2200 matches similar to: "dynamic setting of username and password in database.yml"
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 01
4
how can I control when to commit a transaction?
hello
it seems like this question has appeared a few times with no answer:
how do you get rails to issue ''write'' statements (ie ''CREATE/UPDATE'') to
the database without committing each time?
I tried setting
ActiveRecord::Base.connection.begin_db_transaction
before calling any action on my object, but as soon as
myObject.save
or
myObject.update
is called,
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 Jun 01
4
Ruby on Rails strange issue
Hello,
I just installed Ruby on Rails and created the new repository.
I wanted to use Ruby on Rails with FCGI
The repository was created in /path/to/public_html
ls /path/to/public_html/ :
app cgi-bin config doc log public README script
tmp
asd components db lib logo.jpg Rakefile README_LOGIN test
vendor
I installed fcgi support for ruby on rails and
2006 Apr 07
2
errors.add_to_base
What are the limitations on using:
errors.add_to_base
to display errors in views?
I have tried for days to add errors from my object.rb and they never get
displayed.
class Keyword < ActiveRecord::Base
validates_presence_of(:name, :message => "Name is required.")
validates_uniqueness_of(:name, :message => "This name is already in
use. Please try
2006 Aug 10
6
save without commit ?
How do I get ''save'' to execute without commit?
I have tried:
ActiveRecord::Base.connection.begin_db_transaction
# do some stuff that doesn''t issue a database COMMIT statement
# then:
@myObject.save
# this issues a COMMIT but it shouldn''t! Shouldn''t it wait until I''ve
called:
ActiveRecord::Base.connection.commit_db_transaction
?
what am
2006 May 22
15
collection_select default selected value
Hiall,
Unfortunately I just can''t find out how to setup a default selected
value when using collection_select. My call is like so:
<%= collection_select(:consultant, :lastname, @consultants, :id,
:lastname, { :selected => @current_consultant.id } ) %>
which is not working, I debugged so far that I know that
@current_consultant.id contains the correct value.
Any tips?
cheers
2006 Jun 14
5
InstantRails Lost connection to MySQL server
Hiall,
I just tried out InstantRails version 1.3a. After a virgin install and
filling the fresh mysql db with my app schema, I tried runningthe app
with webrick, only to see the infamous "Lost connection to mysql
server" for every action. What is it that I''m doing wrong? I also have
mysql 5 installed on my machine, but the service is stopped while
experimenting with
2000 Oct 26
2
Problem with lm
Hello Everybody,
I have a problem with the output of lm.
In fact, when I compare the R output and the Splus output, the results
appears to be different :
I have a dataframe with 5 factors , 16 rows and a response.
First, I tried to fit this response to a linear model :
lm(rep~(A+B+C+D+E),data).
The results beetween SPlus and R are different.
In a second time, I tried a new fit :
2015 Jul 31
1
samba-4.1.19: resolving local unix group failes when there exists a local unix user with same name
Hi,
after upgrading samba from 4.1.17 to 4.1.19 on OpenSuSE 13.2, any shares offered by this machine can nolonger be accessed, when these shares contain an entry "force group" which specifies a local unix group and when there exists a unix user with the same name.
Here's an excerpt from smb.conf:
[FactWork]
comment = FactWork-Downloadportal
path =
2009 Feb 18
3
wrong number of arguments (1 for 0)
Hello,
I am new to ruby on rails. When I tried to create a session I am
getting an error, ''wrong number of arguments (1 for 0)'', in my
controller.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ArgumentError in CustomerController#add_to_cart
wrong number of arguments (1 for 0)
RAILS_ROOT: /project/bob_shopping
Application Trace | Framework Trace | Full
2008 Oct 09
2
samba v2 works, v3 does not - Unix groups
Shifting from a v2 samba server to v3 - Read documentation
and googled LOTS but can't seem to find the bits that apply
to my simple(?) server with regards to groups.
# rpm -qi samba
Version : 3.0.28 Vendor: Red Hat, Inc.
Release : 1.el5_2.1 Source RPM: samba-3.0.28-1.el5_2.1.src.rpm
Samba on server (Red Hat Enterprise Linux 5.2) IS MOSTLY WORKING...
home directories
2005 Feb 16
1
ProFTP -> vsFTP Configuration Options
I am moving from a server from running Red Hat 7.2 (with ProFTP) to Centos 3
(with vsFTP). There is a setting in ProFTP that lets me set the default ftp
login directory for a specific user and I would like to do the same with
vsFTP. The reason being is I have a 'webadmin' user that I use for uploading
web content. I am thinking I could make the home directory of the webadmin
/var/www in
2015 Mar 20
4
Access to shares is denied after upgrading from 3.6.3 (openSUSE 12.1) to 4.1.17 (openSUSE 13.2)
Hi Marc,
Am 19.03.2015 um 22:53 schrieb Marc Muehlfeld:
> Am 19.03.2015 um 14:35 schrieb Nissl Reinhard:
>> When I try to access share \\platon\root<file:///\\platon\root> as fee\administrator I get the following:
>>
>> platon:~ # smbclient -c dir -W fee -U administrator%secret //platon/root
>> Domain=[FEE] OS=[Unix] Server=[Samba
2006 May 01
7
ActiveRecord and Database Views
Hiall,
If I have say 10 tables that i would like to wrap up in 1 view to
manipulate data inside these tables, do I then need 10 model.rb files
for all 10 tables plus 1 for the view, or do I just need 1 model.rb
file for the view ?
cheers
Martin
2006 Jun 01
2
update_all broken in postgres?
Hi
has anyone managed to use update_all with rails on postgres?
In my setup, it does not work:
>> @keyword.update_all(myupdates)
NoMethodError: undefined method `update_all'' for #<Keyword:0xb7ac4670>
from
/home/lib/ruby/gems/1.8/gems/activerecord-1.14.0/lib/active_record/base.rb:1786:in
`method_missing''
from (irb):14
I checked that the base.rb
2003 Sep 24
3
Problem with memory for large datasets
Hello,
I would like to know if there is a possibility to "clean" the R memory
during a R session. In fact, I realize a lot of instruction with large
objects (matrix of 500*5000), and I can not manage to achieve the end of my
script due to memory lack. Of course, I've tried to remove all "temporary
object" during the script execution and to perform a garbage collector ...
2006 May 09
3
Named link to image
Hiall,
Call me stupid if you like .,) but it seems i can''t figure out how to
get a named link using a combination of link_to and image_tag. What I
need is basically a link displaying a name along with some image to
indicate status (open,working,finished). I found no combination of
link_to and image_tag that accepts a name, this seems to be solely
used for making whole images into links
2015 Mar 19
2
Access to shares is denied after upgrading from 3.6.3 (openSUSE 12.1) to 4.1.17 (openSUSE 13.2)
Hi,
please have a look into the attached smb.conf. The only changes since 3.6.3 are commenting out all *security* settings and adding
winbind expand groups = 1
The attached smbusers hasn't been changed yet.
When I try to access share \\platon\root<file:///\\platon\root> as fee\administrator I get the following:
platon:~ # smbclient -c dir -W fee -U administrator%secret
2006 Apr 07
6
validation nightmare
Please help, I am really at a loss at how validation is supposed to work
in rails.
Model contains
acts_as_tree
I want to force my NEW objects to have a parent
I do NOT want existing object to have a parent
so I only want to have parent_id on create, NOT on update.
I am trying this:
def validate_on_create
validates_presence_of :parent_id, :message => "You must specify a