# SaltedHashLoginGenerator no such file to load -- iconv

**URL:** <https://www.ruby-forum.com/t/saltedhashlogingenerator-no-such-file-to-load-iconv/65274>\
**Category:** Rails\
**Created:** [August 17, 2006, 5:08am UTC](https://www.ruby-forum.com/t/saltedhashlogingenerator-no-such-file-to-load-iconv/65274 "2006-08-17T05:08:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![eblatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7bcc69/32.png) [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Post date:** [August 17, 2006, 5:08am UTC](https://www.ruby-forum.com/t/saltedhashlogingenerator-no-such-file-to-load-iconv/65274/1 "2006-08-17T05:08:20Z")

</div>

Hi,

I’m trying to use the SaltedHashLoginGenerator as documented on  
[http://wiki.rubyonrails.com/rails/pages/SaltedHashLoginGenerator](http://wiki.rubyonrails.com/rails/pages/SaltedHashLoginGenerator)

Ruby version: ruby 1.8.4 (2005-12-24) [i386-openbsd3.9]

I’ve the following commands:

gem install salted\_login\_generator  
gem install localization\_generator  
rails myapp  
cd myapp  
ruby script/generate salted\_login User Localization

All ran successfully.  
I then created the databases and schema, without incident.  
In theory, I should be able to hit my server:

[http://my.host.com:3000/user](http://my.host.com:3000/user) …

Doing so, throws an error page in my face:  
±----------------------------------

- MissingSourceFile
- 
- no such file to load – iconv  
±-----------------------------------

There are many posts out there conerning this missing dependency for  
windows, but none for \*NIX.

What is iconv and where is it missing from? ruby? rails?

In either case, where do I get said file?

---

<div class="post-metadata">

**Author:** ![eblatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7bcc69/32.png) [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Post date:** [August 17, 2006, 5:33am UTC](https://www.ruby-forum.com/t/saltedhashlogingenerator-no-such-file-to-load-iconv/65274/2 "2006-08-17T05:33:26Z")

</div>

hi. i responded to you on the mailing list but it kicked back my mail  
cuz the server is out of disk space (with a cute python error message)\>  
What is iconv and where is it missing from? ruby? rails?  
â??a ~ # locate iconv | gre -i ruby  
â??/usr/lib64/ruby/1.8/xsd/iconvcharset.rb  
â??/usr/lib64/ruby/1.8/x86\_64-linux/iconv.so  
â??/usr/lib64/ruby/doc/files/1\_8/xsd/iconvcharset\_rb.html  
â??a ~ # eq b iconv.so  
â??[Searching for file(s) iconv.so in \*…]  
â??dev-lang/ruby-1.8.5\_pre1  
(/usr/lib64/ruby/1.8/x86\_64-linux/iconv.so)  
â??  
â??\>  
â??\> In either case, where do I get said file?  
â??  
â??rebuild ruby and get it to pick up on iconv support.  
although there is a libiconv, all â??+i have installed here is  
virtual/libiconv which mean its been provided by something  
â??+else. my guess is a unicode verison of glibc.  
â??  
â??in your case, its probably easier to just use an  
authentication library, instead of an  
â??+authentication-plus-mandatorily-internationalized-error-messages  
library.  
â??+acts\_as\_authenticated is a good start…  
â??

sorry, the " |" thing is muttng taskbar and i cant be arsed to  
turn it off. somebody tell them to fix their list!

---

<div class="post-metadata">

**Author:** ![eblatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7bcc69/32.png) [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Post date:** [August 17, 2006, 5:40am UTC](https://www.ruby-forum.com/t/saltedhashlogingenerator-no-such-file-to-load-iconv/65274/3 "2006-08-17T05:40:36Z")

</div>

Carmen — wrote:

> hi. i responded to you on the mailing list but it kicked back my mail  
> cuz the server is out of disk space (with a cute python error message)\>  
> What is iconv and where is it missing from? ruby? rails?  
> â??a ~ # locate iconv | gre -i ruby  
> â??/usr/lib64/ruby/1.8/xsd/iconvcharset.rb  
> â??/usr/lib64/ruby/1.8/x86\_64-linux/iconv.so  
> â??/usr/lib64/ruby/doc/files/1\_8/xsd/iconvcharset\_rb.html  
> â??a ~ # eq b iconv.so  
> â??[Searching for file(s) iconv.so in \*…]  
> â??dev-lang/ruby-1.8.5\_pre1  
> (/usr/lib64/ruby/1.8/x86\_64-linux/iconv.so)  
> â??  
> â??\>  
> â??\> In either case, where do I get said file?  
> â??  
> â??rebuild ruby and get it to pick up on iconv support.  
> although there is a libiconv, all â??+i have installed here is  
> virtual/libiconv which mean its been provided by something  
> â??+else. my guess is a unicode verison of glibc.  
> â??  
> â??in your case, its probably easier to just use an  
> authentication library, instead of an  
> â??+authentication-plus-mandatorily-internationalized-error-messages  
> library.  
> â??+acts\_as\_authenticated is a good start…  
> â??
> 
> sorry, the " |" thing is muttng taskbar and i cant be arsed to  
> turn it off. somebody tell them to fix their list!

Thanks for your help, I’ll try that.

Why would the Ruby-on-Rails people feature the SaltedHashLoginGenerator  
so proudly when the consensus of the community seems to be that it is  
amazingly f’d?

---

<div class="post-metadata">

**Author:** ![eblatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7bcc69/32.png) [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Post date:** [August 17, 2006, 7:11am UTC](https://www.ruby-forum.com/t/saltedhashlogingenerator-no-such-file-to-load-iconv/65274/4 "2006-08-17T07:11:00Z")

</div>

Elliott B. wrote:

> Thanks for your help, I’ll try that.
> 
> Why would the Ruby-on-Rails people feature the SaltedHashLoginGenerator  
> so proudly when the consensus of the community seems to be that it is  
> amazingly f’d?

Sorry, you need to have ruby-iconv-1.8.4p0.tgz on BSD. Poblem fixed.

---

<div class="post-metadata">

**Author:** ![eblatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7bcc69/32.png) [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Post date:** [September 10, 2006, 5:58pm UTC](https://www.ruby-forum.com/t/saltedhashlogingenerator-no-such-file-to-load-iconv/65274/5 "2006-09-10T17:58:58Z")

</div>

ok,

I found the magic sauce.

It’s actually on my beastie box

It’s here:  
/usr/ports/converters/ruby-iconv

If you are new to FreeBSD [like me],  
/usr/ports/  
is loaded up with a bunch of software which you can install.

Usually software I find there installs cleanly with a simple  
make  
make install

So, I installed ruby-iconv and now  
require ‘iconv’  
returns true rather than an exception.

-Dan

---

<div class="post-metadata">

**Author:** ![eblatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7bcc69/32.png) [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Post date:** [September 9, 2006, 7:50pm UTC](https://www.ruby-forum.com/t/saltedhashlogingenerator-no-such-file-to-load-iconv/65274/6 "2006-09-09T19:50:46Z")

</div>

Yep,

I too have just bumped into this issue.

I see it on a freebsd box:

bash jake oracle /usr/local 12 $ uname -a  
FreeBSD [jake.host.com](http://jake.host.com) 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Tue Nov 1  
05:56:17 CST 2005  
removed\_email\_address@domain.invalid:/usr/src/sys/i386/compile/JAKE  
i386  
bash jake oracle /usr/local 13 $

I compared my bsd box to my Mac:

bash jake oracle ~/o 24 $ find . -print|grep iconv  
./lib/ruby/1.8/xsd/iconvcharset.rb  
bash jake oracle ~/o 25 $ which ruby  
/home/oracle/o/bin/ruby  
bash jake oracle ~/o 26 $ ruby -v  
ruby 1.8.4 (2005-12-24) [i386-freebsd5.3]  
bash jake oracle ~/o 27 $  
bash jake oracle ~/o 27 $

bash jake oracle ~/o 27 $ irb  
irb(main):001:0\> require ‘iconv’  
LoadError: no such file to load – iconv  
from (irb):1:in `require’  
from (irb):1  
irb(main):002:0\>  
irb(main):003:0\* quit  
bash jake oracle ~/o 28 $

bash maco-mois-powerbook-g4-17 maco /r 1 $ find . -print|grep iconv  
./lib/ruby/1.8/doc/files/xsd/iconvcharset\_rb.html  
./lib/ruby/1.8/powerpc-darwin8.7.0/iconv.bundle  
./lib/ruby/1.8/xsd/iconvcharset.rb  
./share/ri/1.8/system/Iconv/iconv-c.yaml  
./share/ri/1.8/system/Iconv/iconv-i.yaml  
bash maco-mois-powerbook-g4-17 maco /r 2 $ which ruby  
/r/bin/ruby  
bash maco-mois-powerbook-g4-17 maco /r 3 $ ruby -v  
ruby 1.8.4 (2005-12-24) [powerpc-darwin8.7.0]  
bash maco-mois-powerbook-g4-17 maco /r 4 $  
bash maco-mois-powerbook-g4-17 maco /r 4 $  
bash maco-mois-powerbook-g4-17 maco /r 4 $ irb  
irb(main):001:0\> require ‘iconv’  
require ‘iconv’  
=\> true  
irb(main):002:0\> quit  
bash maco-mois-powerbook-g4-17 maco /r 5 $

It looks like my Mac has some kind of iconv special sauce on it.  
I assume it was put there when I installed ruby.

I’d like to find the said sauce for my freebsd beastie.

-Dan

---

<div class="post-metadata">

**Author:** ![eblatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7bcc69/32.png) [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Post date:** [September 10, 2006, 6:10pm UTC](https://www.ruby-forum.com/t/saltedhashlogingenerator-no-such-file-to-load-iconv/65274/7 "2006-09-10T18:10:59Z")

</div>

Dan B. wrote:

> It’s here:  
> /usr/ports/converters/ruby-iconv

Hmm. FreeBSD suffering under the Debianism of “We wouldn’t give you a  
full standard distribution if you threatened us with a gun”?

David V.
