# Iconv (& sqlite) problems on Leopard: Ruby 1.9.1/Rails 2.3.2

**URL:** <https://www.ruby-forum.com/t/iconv-sqlite-problems-on-leopard-ruby-1-9-1-rails-2-3-2/166529>\
**Category:** Ruby\
**Created:** [April 26, 2009, 11:34pm UTC](https://www.ruby-forum.com/t/iconv-sqlite-problems-on-leopard-ruby-1-9-1-rails-2-3-2/166529 "2009-04-26T23:34:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [April 26, 2009, 11:34pm UTC](https://www.ruby-forum.com/t/iconv-sqlite-problems-on-leopard-ruby-1-9-1-rails-2-3-2/166529/1 "2009-04-26T23:34:04Z")

</div>

I have both a PPC Mac and an Intel Mac, and I recently installed Ruby  
1.9.1 from source on both the same way, and Rails 2.3.2. I’m trying to  
run a Rails app locally that’s set to use sqlite3.

This is a side question, not the main issue: on the PPC mac, when I  
started the server, I got errors about sqlite3 not existing. I was able  
to fix that by doing “sudo gem install sqlite3-ruby”. This didn’t happen  
on the Intel mac. Why did I have to do that?

On the Intel mac, when I try to start the server, I get this:  
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active\_support/inflector.rb:3:in  
`require': no such file to load -- iconv (LoadError) from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/inflector.rb:3:in`\<top (required)\>’  
from  
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active\_support/core\_ext/integer/inflections.rb:1:in  
`require' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/core_ext/integer/inflections.rb:1:in`\<top (required)\>’  
from  
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active\_support/core\_ext/integer.rb:2:in  
`require' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/core_ext/integer.rb:2:in`\<top (required)\>’  
from  
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active\_support/core\_ext.rb:3:in  
`require' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/core_ext.rb:3:in`block in \<top (required)\>’  
from  
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active\_support/core\_ext.rb:1:in  
`each' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support/core_ext.rb:1:in`\<top (required)\>’  
from  
/usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active\_support.rb:55:in  
`require' from /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/active_support.rb:55:in`\<top (required)\>’  
from  
/usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/commands/server.rb:1:in  
`require' from /usr/local/lib/ruby/gems/1.9.1/gems/rails-2.3.2/lib/commands/server.rb:1:in`\<top (required)\>’  
from script/server:3:in `require' from script/server:3:in`’

And this doesn’t happen on the PPC mac. On PPC, when I run “gem which  
iconv”, I get  
/usr/local/lib/ruby/1.9.1/powerpc-darwin9.6.0/iconv.bundle. When I run  
that on the Intel mac, I get “Can’t find ruby library file or shared  
library iconv”. (Using the old preinstalled 1.8 version of ruby, the  
path to the iconv bundle that’s in …/Ruby.framework/… shows up, on  
both computers.) I checked the  
/usr/local/lib/ruby/1.9.1/i386-darwin9.6.0/ folder on the Intel mac, and  
iconv.bundle is not there. Why is this happening? How can I fix it â€”  
where can I get iconv?

Thanks.

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [April 27, 2009, 12:00am UTC](https://www.ruby-forum.com/t/iconv-sqlite-problems-on-leopard-ruby-1-9-1-rails-2-3-2/166529/2 "2009-04-27T00:00:14Z")

</div>

On Apr 26, 2009, at 4:34 PM, Jacob Bandes-storch wrote:

> I have both a PPC Mac and an Intel Mac, and I recently installed Ruby  
> 1.9.1 from source on both the same way, and Rails 2.3.2. I’m trying to  
> run a Rails app locally that’s set to use sqlite3.
> 
> This is a side question, not the main issue: on the PPC mac, when I  
> started the server, I got errors about sqlite3 not existing. I was  
> able  
> to fix that by doing “sudo gem install sqlite3-ruby”. This didn’t  
> happen  
> on the Intel mac. Why did I have to do that?

My leading guess would be that your path is different on the two  
machines. On one, it found the Ruby interpreter you expected, but on  
the other it found one without the gem installed because of the way  
the path was set. Another option is that both Ruby interpreters had  
the gem installed on one box, but not the other.

> On the Intel mac, when I try to start the server, I get this:  
> /usr/local/lib/ruby/gems/1.9.1/gems/activesupport-2.3.2/lib/  
> active\_support/inflector.rb:3:in  
> `require’: no such file to load – iconv (LoadError)

> where can I get iconv?  
> The standard iconv library ships with Ruby, so you shouldn’t need to  
> install it on either version. It’s part of Ruby’s standard library.

I’m not sure why Rails fails to find it, that being the case. You’re  
install obviously isn’t what I expect it to be.

James Edward G. II

---

<div class="post-metadata">

**Author:** ![igotimac](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/85f322/32.png) [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Post date:** [April 27, 2009, 12:16am UTC](https://www.ruby-forum.com/t/iconv-sqlite-problems-on-leopard-ruby-1-9-1-rails-2-3-2/166529/3 "2009-04-27T00:16:59Z")

</div>

> My leading guess would be that your path is different on the two  
> machines. On one, it found the Ruby interpreter you expected, but on  
> the other it found one without the gem installed because of the way  
> the path was set. Another option is that both Ruby interpreters had  
> the gem installed on one box, but not the other.  
> The paths are about the same, both having /usr/local/bin:/usr/bin:/bin  
> at the beginning, so I don’t know how that would happen. The Ruby  
> interpreter on both is the same, 1.9.1p0.

> The standard iconv library ships with Ruby, so you shouldn’t need to  
> install it on either version. It’s part of Ruby’s standard library.
> 
> I’m not sure why Rails fails to find it, that being the case. You’re  
> install obviously isn’t what I expect it to be.  
> That’s odd. Both were configured with --enable-shared --enable-pthread  
> CFLAGS=-D\_XOPEN\_SOURCE=1 (from  
> [Dan Benjamin](http://hivelogic.com/articles/view/ruby-rails-leopard)). Is that helpful  
> at all? How would I go about figuring out why it didn’t install iconv on  
> the one machine?

Another thing I just noticed is that when I run ruby script/console on  
the Intel mac, I get:  
Loading development environment (Rails 2.3.2)  
/usr/local/lib/ruby/gems/1.9.1/gems/activerecord-2.3.2/lib/active\_record/i18n\_interpolation\_deprecation.rb:23:in  
`<class:Simple>': undefined method `alias\_method\_chain’ for  
I18n::Backend::Simple:Class (NoMethodError)  
Whereas it works on the PPC mac. Is this related? Or is something really  
broken?
