# Bug in Ruby 1.9.1 or me? ERROR: While executing gem ... (TypeError) can't convert Pathname into Str

**URL:** <https://www.ruby-forum.com/t/bug-in-ruby-1-9-1-or-me-error-while-executing-gem-typeerror-cant-convert-pathname-into-str/162129>\
**Category:** Ruby\
**Created:** [March 6, 2009, 1:08am UTC](https://www.ruby-forum.com/t/bug-in-ruby-1-9-1-or-me-error-while-executing-gem-typeerror-cant-convert-pathname-into-str/162129 "2009-03-06T01:08:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Todd\_Miller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/f6c823/32.png) [@Todd\_Miller](https://www.ruby-forum.com/u/Todd_Miller)\
**Post date:** [March 6, 2009, 1:08am UTC](https://www.ruby-forum.com/t/bug-in-ruby-1-9-1-or-me-error-while-executing-gem-typeerror-cant-convert-pathname-into-str/162129/1 "2009-03-06T01:08:51Z")

</div>

I installed ruby on Ubuntu 8.1 in the following manner  
removed all ruby files using locate  
sudo apt-get install readline5-dev build-essential autoconf wget  
libreadline5-dev libncurses5-dev zlib1g-dev libsqlite3-dev libssl-devsv  
libncurses5-dev libssl-dev checkinstall  
mkdir -p /usr/local/src && cd /usr/local/src  
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.1-p0.tar.bz2  
tar -xjvf ruby-1.9.1-p0.tar.bz2  
cd ruby-1.9.1-p0  
.sudo ./configure --prefix=/usr --enable-pthread --enable-shared  
#perhaps  
i should have added -with-readline-dir=/usr/local  
sudo make

# sudo checkinstall found everything to be OK

IINSTALLING GEMS  
sudo gem sources -a [http://gems.github.com](http://gems.github.com)  
sudo gem install rack rake # It seems that you need to install rack  
before  
installing actionpack and rails requires rake"  
sudo gem install rails actionpack activesupport activerecord  
activeresource  
actionmailer # sudo gem install rails didn’t install activesupport and  
some  
other packages  
Now all of this seems to work fine. However, when I install other gems,  
I  
usually receive the following error message

sudo gem install sinatra  
Successfully installed sinatra-0.9.1  
1 gem installed  
Installing ri documentation for sinatra-0.9.1…  
–inline-source will be removed from RDoc on or after August 2009  
Updating ri class cache with 3781 classes…  
Installing RDoc documentation for sinatra-0.9.1…  
–inline-source will be removed from RDoc on or after August 2009  
ERROR: While executing gem … (TypeError)  
can’t convert Pathname into String

Googling on ‘can’t convert Pathname into String’ doesn’t turn up much.  
Does  
anyone have any ideas about this?
