top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

RoR: PostgreSQL password in environment variables

+2 votes
292 views

I've heard that using environment variables to provide the password and other PostgreSQL parameters is the way to go.

Is the Nitrous.io way (explained at http://help.nitrous.io/postgres/) the way you do it? Or is there a better way?

posted Feb 21, 2015 by Satish Mishra

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+3 votes

I am using rails 3.1 and ruby 1.9.3,Now i want to use uuid concept in rails 3 for existing data

so I did like :-

create_table :posts, :id => false do |t|
 t.string :uuid, :limit => 36, :primary => true
end

ActiveRecord::Base.class_eval do

# old rails versions
set_primary_key 'uuid'

before_create :generate_uuid
def generate_uuid
self.id = UUIDTools::UUID.random_create.to_s
end
end

This is working for new data,now i want to migrate existing data with relation.for uuid they are using datatype as string,in postgresql the data type used for primary_key and foreign key is integer ,so if i am trying to change foreign key integer to string it is throwing error. Can someone please tell me some example,how to do this.

0 votes

I have a default message in a form ( I used the placeholder attribute).
Unfortunately, when I submit a form it doesnt like this attribute (that field must appear blank), because if I type over it it works.

Is there something else I should use besides the placeholder attribute?

+1 vote

I deployed one small app in heroku built on ROR, now I want to send mails. How is it possible can anyone give me a details how to do it.

0 votes

I have 4 tables from the first table, I took all data from the two columns and displayed it in the view. For each data, I have two text fields and the user is supposed to fill those data. Having filled data into the text field, how can I insert all the records into the second table using one form only?

0 votes

Is it any way to disable email delivery in development mode? If yes then please suggest?

...