O so I  modified person model and put this

def self.encrypt(password)
     if RAILS_ENV == "production"
       Crypto::Key.from_file("#{RAILS_ROOT}/config/production_rsa_keys/ 
rsa_key.pub").encrypt(password)
     else
       Crypto::Key.from_file("#{RAILS_ROOT}/config/production_rsa_keys/ 
rsa_key.pub").encrypt(password)
     end
   end

   # Encrypts the password with the user salt
   def encrypt(password)
     self.class.encrypt(password)
   end

   def decrypt(password)
     if RAILS_ENV == "production"
       Crypto::Key.from_file("#{RAILS_ROOT}/rsa_key").decrypt(password)
     else
       Crypto::Key.from_file("#{RAILS_ROOT}/rsa_key").decrypt(password)
     end
   end

maybe rake db:migrate on production mode can add keys to other dir

PAco

On Jun 20, 2008, at 8:00 PM, kidpollo wrote:

>
> Ok for production environments my deploy script gets my git repo but
> the rsa_key is exluded from the repo so alfter first deply and install
> of isoshi you loose de rsa key?
>
> How can I gererate it on each deploy? Or put it in another directory?
> >


--~--~---------~--~----~------------~-------~--~----~
Insoshi developer site: http://dogfood.insoshi.com/
Insoshi documentation: http://docs.insoshi.com/

You received this message because you are subscribed to the Google
Groups "Insoshi" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/insoshi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to