Displaying 20 results from an estimated 100 matches similar to: ""Multiple default values" with Rails migration"
2006 Feb 03
4
contoller code mysteries
In my controller...this code works
def list2
first_name = params[:client][:first_name]
@myclients = Client.find(:all, :conditions =>
["first_name = :first_name", {:first_name => first_name}])
end
this code doesn''t...
def list2
first_name = params[:client][:first_name]
if first_name
searchstring = ''["first_name =
2006 Jan 19
3
Migrating from Mysql to PostgreSQL
I tried to use ''rake db_schema_dump'' from old MySQL database and then
use ''rake db_schema_import'' to rebuild the database in PostgreSQL. The
issue here is that only some of tables can be imported successfully.
For example, in the dumped schema.rb:
create_table "profiles", :force => true do |t|
t.column "ticker", :string, :limit
2006 Feb 17
4
Need Help with Globalize Plugin
Hi everyone,
I''ve been playing around with the Globalize plugin for some days now
but I can''t seem to make it work properly with my models. I''m currently
using Postgres 8.0 for the database and needed to make some
modifications with my migration file that was posted by Jake Morrison in
the Globalize wiki...
2020 Aug 24
2
smbclient mask command seems not to work the same way with recurse ON for mget and mput
Dear Jeremy.
Really appreciate you took your time to answer. I had already reviewed
source4/client/client.c looking for mput (cmd_mput) command, but unluckily
saying that my C programming skills are poor woud be really overrating them.
I'm sorry to disagree for two reasons
1-. It works for mget, true that the source code is completely different.
2-. If taking a look into smbclient man
1997 Dec 17
0
userv - how to make cron (et al) not setuid
[Mod: chat removed -- alex]
From: userv-maint@chiark.greenend.org.uk (Ian Jackson)
Approved: alex@yuriev.com
To: linux-security@redhat.com
Subject: userv - how to make cron (et al) not setuid
0. Introduction
Some time ago I posted on linux-security to say that I was working on
a client/server pair which would allow you to invoke a privileged
service in a more secure manner. I''ve now
2012 Jul 25
0
help about quota config
hi all :
mysql mailbox below :
CREATE TABLE `mailbox` (
`username` varchar(255) NOT NULL DEFAULT '',
`uid` varchar(255) NOT NULL DEFAULT '',
`password` varchar(255) NOT NULL DEFAULT '',
`clearpwd` varchar(128) NOT NULL DEFAULT '',
`name` varchar(255) NOT NULL DEFAULT '',
`mailhost` varchar(255) NOT NULL DEFAULT '',
`maildir`
1996 Dec 19
1
Calls which cross trust boundaries
Many of the security problems we''ve had to deal with recently have
been where one program invokes another when no good level of trust
exists between them.
Currently solutions to this requirement are produced on an ad-hoc
basis, usually involving set-id programs (often setuid root),
superuser daemons calling user programs for `upcalls'', or both.
There are problems with this
2006 Feb 22
0
Realtime queues with Firebird SQL through unixodbc
Hello,
I have a partially working Realtime Queue using unixODBC and Firebird. I
followed the steps on asterisk-guru and the voip-info asterisk message
boards but have been having no success.
I say that my queue is partially working because callers can join the
queue. However the calls do not go to the agents even if the agent is
not tied up and is available for calls. So the caller is stuck
2009 Apr 21
2
problem with sqlite3....
Hi all,
I am relatively new to ruby and RoR. I created a simple rails proj named
foo by giving command
-> rails foo --database=sqlite3
It created a new rails proj.. So in that I created a simple db class
named user by using the below command
-> ruby script/generate model user
so in db/migrate I got a file named 20090421211825_create_users.rb
created.
and in app/models : user.rb got
2008 Jan 09
0
Beginner: How to use data from external Database
Hi,
im new to RoR so sorry if the questions sounds stupid to you.
Im trying to build a tool for a browsergame.
The game allows access to its database and the db looks like this:
table villages:
`id` int(9) unsigned NOT NULL default ''0'',
`x` smallint(3) NOT NULL default ''0'',
`y` smallint(3) NOT NULL default ''0'',
`tid` tinyint(1)
2009 Aug 31
3
Migration - wrong SQL statement is created
Hi,
I am doing my first steps with RoR and I have the following problem:
I execute my migration file with the following content on a
MySQL-database via Rake:
<code>
class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.integer :id
t.string :username, :size => 100
t.string :password, :size => 100
t.string :email, :size
2004 May 10
3
sqlSave with underscores in table fieldname
Hi group,
I try to write a frame to a table (RODBC). I use
colnames(temp6) <- c("ind_id","ser_id","period_id","year","calc","mean")
sqlSave(channel, temp6, tablename = "series_indices_test",append= TRUE, rownames=FALSE, verbose = FALSE, test = FALSE, nastring = -999999, fast = FALSE)
This is giving me an error:
Error in
2007 Feb 08
2
uninitialized constant CreateUsers
what could be causing this?
* Execute environment
** Execute db:migrate
rake aborted!
uninitialized constant CreateUsers
--
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 email to
2008 Mar 16
1
Should I update to DRBD 82?
Hello,
This morning I noticed the following output from "yum update":
Installing:
drbd82 x86_64 8.2.5-1.el5.centos extras
209 k
replacing drbd.x86_64 8.0.11-1.el5.centos
As far as I'm aware DRBD works fine for me. Is there a way I can find out
about the new release and weather I should upgrade?
I can't figure out the CentOS issue tracking system
2006 Apr 25
0
Migrate default now()
I want to set default value to current time of database:
class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
# ...
t.column :created_at, :timestamp, :null => false, :default => ''now''
end
end
#...
end
On postgresql, it is converted to:
created_at timestamp NOT NULL DEFAULT ''2006-04-25
2010 Nov 02
0
Can't use paperclip plugins
development env:
Ubuntu 9.04
ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
rails -v
Rails 3.0.0
gem -v
1.3.7
Here what I did:
rails new testpaperclip -d mysql
cd testpaperclip
rake db:create
rails g scaffold user name:string address:string
rake db:migrate
== CreateUsers: migrating
====================================================
-- create_table(:users)
->
2008 Jan 10
1
RODBC, postgresql on Linux
Dear all,
I facing pbs using RODBC library.
I'm working on a Linux (Ubuntu Gutsy) os, with R version 2.5.1.
I've got Postgresql 8.2.5 installed with the odbc-postgresql package.
I try to connect in a R session to a postgresql database using:
odbcConnect(dsn="thedatabasename",uid="theuser",pwf="thepasswd",case="postgresql")
I get a message error,
2015 Feb 11
0
Invalid password in passdb: Not a valid MD5-CRYPT or PLAIN-MD5 password
Hi friends,
I am migrating imap-courier to dovecot, I use openbsd+postfix+imap-courier,
and now I'm trying to run openbsd+opensmtpd+dovecot.
In the beginning it was a little traumante but it works OpenSMTPD correctly.
Now I have configured dovecot, and I hope that your backend
authorization is the
same database that was used imap-courier.
In /var/log/maillog receipt the following error
2005 Oct 03
3
Boolean quoting, postgresql
http://dev.rubyonrails.org/ticket/1117
I''ve attached a patch to ticket 1117 which fixes it so that booleans
are escaped as booleans, not integers. Specifically, this situation
will now work
find_all(["send_date=? and sent=?", Date.today, false])
Which matches peoples expectations, but it causes some problems with
the postgresql unit tests. Specifically, the use of
2004 Apr 19
3
encoding from 22050Hz source
Hi!
I'd like to encode from a 22050 Hz source wav file (only in that case),
but i get the following error message: "Invalid floating point operation"
I use delphi:
vorbis_encode_init_vbr(vi,2,22050,0.5)
.
.
.
While (i < readCount div 4) Do
Begin
buffer[0][i] := smallInt((pArray(@readbuffer)[i shl 2 + 1] shl 8) or pArray(@readbuffer)[i shl 2 + 0]) / 32768;