similar to: PostgreSQL, postgres gem, rails2.pdf, http://ruby.scripting.ca/postgres/ confusion...

Displaying 20 results from an estimated 7000 matches similar to: "PostgreSQL, postgres gem, rails2.pdf, http://ruby.scripting.ca/postgres/ confusion..."

2006 Aug 08
1
Bad file descriptor - connect(2)
Hi All, I am a newbie in Ruby-Rails. Actually we are using postgre SQL and Ruby application to access the DB. I have made the controller and the model classes. My database.yml contains: development: adapter: postgresql database: test username: poc password: poc host: localhost:5000 test: adapter: postgresql database: test username: poc password: poc host: localhost:5000
2006 Aug 04
8
Demo in rails2.pdf of add_price migration, PostgreSQL 8.1.4
People, I''m looking at the migrate example on p 74 of the rails2.pdf It''s a simple example of using a migration to add a column to the products table. Here is a copy of the migration file named 002_add_price.rb after I generated and then edited it: class AddPrice < ActiveRecord::Migration def self.up add_column :products, :price, :decimal, :precision => 8, :scale
2011 Oct 26
4
Help wanted: pg vs. postgres-pr gems
Hi all, I installed Rails 3.0 + PostgreSQL 8.4. Installed the gem postgre-pr I added " gem ''postgres-pr'' " to my Gemfile I defined my database.yml with: # PostgreSQL 8.4 development: adapter: postgresql encoding: unicode database: testdb pool: 5 username: test password: ****** I run rails server which starts, but application environment returns this error:
2010 May 12
10
Rails and PostgreSQL ???
Hi every one How are you? after a days and searching in forums i still can not find some things that helping me to connect Rails with postgre SQL of course those are helpful but not for a stupid person like me :D So i need my friends helping me here and advice me to how can i connect this two things (ROR and Postgre Sql) I need your help so much My eyes going blind because of searching and
2005 Dec 05
1
Rails and Postgres ARRAYs
Hello list, I''ve got a Postgres table defined as create table A ( id serial primary key, names varchar(10)[], val float[] ) Although I *could* split out the names/val arrays into one or more separate tables with one-to-many relations back to table A, the actual business problem is such that I''d prefer not to do so if I can avoid it. Is there any way of reading/writing
2006 Aug 09
5
HELP!!! New to Ruby
Hi all, I am new to Ruby programming language. I know that require ''gemname'' is used for using some gems in our application. I have a sample application developed in Ruby on Rails which have the following lines of code: require ''zlib'' require ''stringio'' Can you plz help me to know what these gems are used for. It would be very helpful if
2005 Dec 21
1
Escape bytea binary data in postgres SQL
Hi! I want to escape binary data correctly either manually or using some pre-defined function that does this for me! I have found on the web: PGconn.escape_bytea but I only get "undefined method". Any ideas, what is the correct way of doing this my self? I''m using Rails (WEBrick) under Windows XP with postgre-pr 0.4.0 I have tried: s_buffer = s_buffer.gsub(/['']/,
2007 Mar 05
2
SOLVED:Re: How to select postgres for usage instead postgres-pr?
Figured it out chaps..not to worry!!! -- Regards Andrew On 05/03/07, Andrew Madu <andrewmadu-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hi, > further to my additional email the gem build for postgres did not work, so > I downloaded and copied postgres.so into: > > C:\pgRails\lib\ruby\site_ruby\1.8\i386-msvcrt > > Again, how do I point rails to using this
2009 Jul 06
1
[PATCH server] add ipv6 postgres trust
If management server has ipv6 enabled and postgres is not configured to allow localhost access via ::1 the postgres service will fail. --- installer/modules/ovirt/manifests/postgres.pp | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/installer/modules/ovirt/manifests/postgres.pp b/installer/modules/ovirt/manifests/postgres.pp index 36bcdc0..12b7764 100644 ---
2006 May 16
3
Installing the Postgres gem on Ubuntu
Hi, I''m having difficulty installing the "postgres" gem. postgres-pr installed fine, but whenever I run: sudo gem install postgres I get: ERROR: While executing gem ... (RuntimeError) ERROR: Failed to build gem native extension. Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/postgres-0.7.1 for inspection. I''ve had a bit of a poke around, and
2008 Apr 07
2
CentOS, Postgres init and puppet
Me again! I have a recipe that looks like: class postgresql { file { pg_hba_conf: name => "/var/lib/pgsql/data/pg_hba.conf", source => "puppet://puppetmaster/files/workstations/common/var/lib/pgsql/data/pg_hba.conf", owner => postgres, group => postgres, mode => 600, subscribe => [ Package[postgresql] ],
2006 Mar 29
3
MySQL in dev, Postgres in prod - differences in "LIKE" query
Hi everyone, I run MySQL in my dev environment, but Postgres in my production environment (out of necessity). I''m having trouble finding a way to write a query with a LIKE condition that is supported as case insensitive in both databases. Right now, I have this: @query = "m" # for example @people = Person.find(:all, :conditions => ["last_name LIKE ?", @query +
2009 Jun 23
1
[PATCH server] add postgres permissions requires prior to starting service
Give this one a try which will require the user/hosts permissions to be setup prior to starting postgres --- installer/modules/ovirt/manifests/postgres.pp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/installer/modules/ovirt/manifests/postgres.pp b/installer/modules/ovirt/manifests/postgres.pp index c46b360..381d67c 100644 ---
2006 Aug 18
3
connect to postgres db
I''ve followed the tutorial and just don''t get it. How do I connect my ruby/rails sample app to my postgres database. I did follow step 1-4 of the tutorial, I go to step 5: (http://wiki.rubyonrails.org/rails/pages/TutorialStepFive) and try the "rake" commmand and get this: rake aborted! no such file to load -- postgres so I ran with -trace and get this:
2007 Apr 10
2
postgres 7 - CentOS 4.4
Hi Firstly apologies but i have to install an app that uses postgres but i am more a MySQL/Oracle guy so i maybe doing something really wrong here.. I am following instructions for creating a DB user and encountering this # createuser -ADP -U postgres foo Enter password for new user: Enter it again: createuser: could not connect to database template1: FATAL: IDENT authentication failed for
2006 Jul 25
2
Losing precision while copying interval type data (Postgres)
Hi I am trying to use active record to copy some data. One of the entry I am copying is type interval (Postgres); however, it lose some precision after I copied that column. Here is what I did: @newData.elapsedtime = @oldData.elapsedtime @newData.save Result: both displayed as 00:00:02.453 in the table, however, if I use the following command to convert its value into float ( SELECT
2012 Oct 07
3
Option for inserts/updates/deletes on the Postgres adapter to return all columns, not just the id
By default with Rails, Postgres will return the id of a newly inserted record using returning "id". Sometimes when working with Postgres, tables will have triggers on them that modify the row''s data while being saved. As such, it would be great to also provide an option for Postgres to also let insert/updates and deletes to use returning * (which will return the row as it
2007 Apr 18
1
Postgres-pr interface not found
I''ve installed the postgres-pr gem, and it is found using gem list v0.4.0. In my active record source, inside the postgresql_adapter.rb file, I''ve changed line 7 from: require_library_or_gem ''postgres'' unless self.class.const_defined?(:PGconn) to: require_library_or_gem ''postgres-pr'' unless self.class.const_defined?(:PGconn) ...to try and
2008 Jun 12
1
ruby-postgres gem installation on Leopard
Hi all I am just about to start a project using rails and am trying to setup my enviroment with postgres as the database. I have installed postgres 8.3.1 from source and am now having trouble installing the ruby- postgres gem. The following is the output trace I am getting, looks like a problem with headers/includes, any help is greatly appreciated. Thanks Simon sudo gem install ruby-postgres
2010 Aug 19
4
Postgres, concurrency, and rails
I work on a fairly large website that uses Ruby 1.8.6 and Rails 1.2.3. We cannot upgrade as it will hopelessly break our code. We are working on a new version in Java but for the next year at least we are stuck with the legacy system. We use the latest version of Postgresql for the database using the postgres-pr gem. I am attempting to implement cron tasks within the system using Rufus Scheduler,