similar to: Help with Rails and postgres with sequence numbers (global?)

Displaying 20 results from an estimated 200 matches similar to: "Help with Rails and postgres with sequence numbers (global?)"

2005 Nov 07
0
pk_and_sequence_for(table) bug?
Hi, Doing connection.pk_and_sequence_for doesn''t return anything when I''m positive I''ve got a PK and sequence on my table on column "id", see DDL below. Is this a bug? ?> Player.primary_key => "id" >> Player.connection.default_sequence_name "players" => "players_id_seq" >>
2006 Mar 16
3
inserted_at seems buggy in production mode?
Hi, I''ve got a table with an inserted_at column. When I insert a record it automatically injects the current date/time, all is well. Then when I insert a second record, it uses the exact same timestamp that is used in the first record. This behavior only seems to occur in production mode. When I restart the server, the problem goes away but then immidetatly occurs again on the
2006 Apr 19
0
My database model''s connection appears messed up.
I am trying to add data from a form, and the rails doesn''t appear to be making any effort at all. I''ve put deliberately erroneous data, but still nothing. All the development log shows is this. This is the code in use - based on the example from Rails book def add_customer_admin if request.get? @login = CustomerAdmin.new else @login =
2008 Jan 15
1
actionmailer the background
I have bdrb successfully set up and running in a local project. It''s doing two things: 1) processing large csv files and using ActiveRecord to insert 2) sending large batches of emails using ActionMailer In development both work well. I see my ActionMailer emails in the log (though it''s the development.log -- odd?) On the production server csv processing works well, but
2010 Sep 17
0
ruby's oauth2 grant_type
Hi, i started using oauth2 gem by intridea (http://github.com/intridea/oauth2) and don''t know how to fix this problem. I have developed both client and server and on request for access_token i see no grant_type parameter. My code from client callback controller class CallbackController < Devise::OauthCallbacksController def accounts access_token =
2006 Apr 29
4
Wild SQL -- public/500.html -- postgres-pr
Every page of my DEPOT on Postgresql rails app now gets an error from postgres-pr about some wild left-join SQL that has nothing to do with my tables: SQL (0.000000) NameError: undefined local variable or method `errors'' for #<PostgresPR::Connection:0x3b200c0>: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM pg_attribute a LEFT JOIN
2006 Feb 12
1
fcgid -> errors
Hi, I''m trying to get rails running on Debian stable with Apache 2, mod_fcgid, Rails 1.0. The application works fine with webrick (*). Let''s start here: @eugene [/var/www/ls2/linuxsi/public] $ ./dispatch.fcgi Status: 500 Internal Server Error Seems to result in the following in the log files: [12/Feb/2006:12:18:40 :: 4105] starting [12/Feb/2006:12:18:40 :: 4105] terminated
2009 Nov 26
2
[error] avahi_entry_group_add_service_strlst("AdminNodeFQDN") failed: Invalid host name
Hi, After doing a clean install of ovirt in a Fedora 11 VM, I am unable to get anything working in the web interface. All I get is an error 500. After reviewing the logs I see the following error in /var/log/http/error.log [Thu Nov 26 11:29:11 2009] [notice] Apache/2.2.13 (Unix) DAV/2 mod_auth_kerb/5.4 mod_nss/2.2.11 NSS/3.12.2.0 mod_python/3.3.1 Python/2.6 configured -- resuming normal
2008 Nov 04
9
RSpec and PostgreSQL not playing nicely together
Here is a very simple spec: -- require File.expand_path(File.dirname(__FILE__) + ''/../spec_helper'') describe Product, "The Product model" do describe "When a new blank product object gets created" do before(:each) do @product = Product.new end it "should not be valid" do @product.should_not be_valid
2006 Aug 25
0
Re: login sugar
Well, it turns out that this piece of software requires that a new user call the welcome action. The welcome action changes the user''s state to verified. Once the user is verified, he will be allowed to attempt authentication. The login page actually states this which is useful to me once I read it. I get the URL to the welcome action from the e-mail sent out or the development.log
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
2005 Dec 31
7
Application Errors w/ layout & custom view pages
1) I get Rails Application Error when trying to use layout test_controller def list layout "stdlayout" end in the views/test/layouts stdlayout.rhtml <html> <head><title>test</title></head> </body> <h1>Test</h1> <%= content_for_layout %> </body> </html> 2) I get Rails Application Error when trying to use a separate
2008 Mar 08
9
Validation error handling on related models
I have 2 models, entity and client. Entity has_one client and client belongs_to entity. Entity has attributes name and legal_name. Entity also has an unique index on (lower(name)). The pKey for both is the conventional Rails id. Client has a fKey constraint on entity_id and is indexed in entity_id. In controllers/clients_controller.rb I have: # GET /clients/new # GET /clients/new.xml
2006 Aug 06
6
View passing empty or no value to controller -- help
Hi, I have the following view: <%= start_form_tag ( { :action => ''find'' }, :method => ''get'') %> <p> <%= text_field_tag :lemma, params[:lemma] %> </p> <%= link_to "Find It", :class => "submit" %> <%= end_form_tag %> And the following find action in the controller:
2006 May 03
4
default values
Hello, I''m working with a postgresql table CREATE TABLE elements ( id serial primary key, c1 text default f1(), ... cN text default fN() ); But if I use de lines @element = Element.new @element.save the values that element take are the nextval in the id field and nules in all the other fields. How can I get the defaults? (but without rewriting the
2006 Jan 19
4
multiple database in the same actions?
Hi, I read the example in http://wiki.rubyonrails.com/rails/pages/HowtoUseMultipleDatabases, it show us how to connect to other database, each time we start a new action, however, this doesn''t work while you try to connect to two different database within the same action. SO I wonder is it possible to bind to two or more database within the same action???? Thanks you very much Saiho
2009 Jun 04
2
RPostgreSQL segfault with LEFT JOIN
Hi, I recently upgraded to R 2.9.0 on linux x86. After doing so, I switched to the RPostgreSQL package for interfacing with a postgresql database. I am using postgresql 8.3.7. A query that works from the postgresql terminal is causing a segfault when executed from R. My sessionInfo, the error message, and the R code used to generate the error are listed below. I have noticed that a
2006 May 18
5
Overriding default DELETE behavior with logical deletes
Hello! I am trying to figure out how to implement *logical deletes* instead of physical deletes using ActiveRecord. Basically, in many applications that deal with E-Commerce, you really can''t physically delete almost anything, because records must be kept for auditing and customer service tracking purposes. In the past, I''ve implemented logical deletes as follows: 1.
2007 Apr 24
1
problem POSTing with curl and REST using scaffold_resource
I issued the following curl command to post to the database using REST: curl -i -X POST -d "<heartrate><heartRate>102</ heartRate><sessionID>1002</sessionID><timeStamp>15068</timeStamp></ heartrate>" http://localhost:3000/heartrates I have tested the GET (with curl also) and it works fine! curl http://localhost:3000/heartrates/45
2006 Jul 26
0
HTML Emails with a layout in Action Mailer?
Hi, I am using implicit HTML and text emails (alternative). So I have some view files called mymail.text.plain.rhtml and mymail.text.html.rhtml. Now since I have a lot of mails to send I would like to use a layout for my HTML emails only. How can I do that? Regards Till Vollmer -- Posted via http://www.ruby-forum.com/.