From: Jeremy Hinegardner Date: 2008-05-22T14:13:13+09:00 Subject: Re: htpasswd On Thu, May 22, 2008 at 07:51:39AM +0900, Anka Anka wrote: > How to generate apache password with ruby? I have to generate from ruby > code the same password like htpasswd2 -m make. In other words: from ruby > on rails application I have to generate a password, which will be used > not only for login, but also to generate apache config files (e.g. > password files for subversion) - so the password must be exactly the > same. > Can someone help me? > Sorry for my english... Try out the htauth gem and see if it works for you: gem install htauth http://copiousfreetime.rubyforge.org/htauth/ > HTAuth is a pure ruby replacement for the Apache support programs htdigest > and htpasswd. Command line and API access are provided for access and > control of htdigest and htpasswd files. enjoy, -jeremy -- ======================================================================== Jeremy Hinegardner jeremy@hinegardner.org