# A problem with Gem

**URL:** <https://www.ruby-forum.com/t/a-problem-with-gem/195113>\
**Category:** Ruby\
**Created:** [September 17, 2010, 6:29am UTC](https://www.ruby-forum.com/t/a-problem-with-gem/195113 "2010-09-17T06:29:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zark\_Yoc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e19adc/32.png) [@Zark\_Yoc](https://www.ruby-forum.com/u/Zark_Yoc)\
**Post date:** [September 17, 2010, 6:29am UTC](https://www.ruby-forum.com/t/a-problem-with-gem/195113/1 "2010-09-17T06:29:47Z")

</div>

I’m download the Ruby version 1.9.2-p0,and compile and install it,on  
/usr/local/.  
after the finish , i type the “gem install merb” or “gem install list”  
show  
an error.  
like this:

_ironbook:/home/zark/download/zlib-1.2.5 # gem install merb -zlib  
ERROR: Loading command: install (LoadError)  
no such file to load – zlib  
ERROR: While executing gem … (NameError)  
uninitialized constant Gem::Commands::InstallCommand  
ironbook:/home/zark/download/zlib-1.2.5 # gem install merb --zlib  
ERROR: Loading command: install (LoadError)  
no such file to load – zlib  
ERROR: While executing gem … (NameError)  
uninitialized constant Gem::Commands::InstallCommand_

ruby and gem version:  
\*ironbook:/home/zark/download/zlib-1.2.5 # ruby -v  
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86\_64-linux]

ironbook:/home/zark/download/zlib-1.2.5 # gem -v  
1.3.7\*

on my system already has zlib, then i know maybe the version is low. so  
i  
download zlib and compile , install.

then type "gem list " or “gem install \*\*” is also has this  
problem…

how can i solve this problem ??

thanks everybody…  
_Zark Yoc_

---

<div class="post-metadata">

**Author:** ![Zark\_Yoc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e19adc/32.png) [@Zark\_Yoc](https://www.ruby-forum.com/u/Zark_Yoc)\
**Post date:** [September 17, 2010, 6:36am UTC](https://www.ruby-forum.com/t/a-problem-with-gem/195113/2 "2010-09-17T06:36:13Z")

</div>

my system is openSUSE 11.1, in the system software resource is too low  
version … I don’t like …  
so I download sourcecode and compile , but this problem is first time  
occurs…

_Zark Yoc_

---

<div class="post-metadata">

**Author:** ![Zark\_Yoc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e19adc/32.png) [@Zark\_Yoc](https://www.ruby-forum.com/u/Zark_Yoc)\
**Post date:** [September 17, 2010, 9:26am UTC](https://www.ruby-forum.com/t/a-problem-with-gem/195113/3 "2010-09-17T09:26:06Z")

</div>

Zark Yoc wrote:

> so I download sourcecode and compile , but this problem is first time  
> occurs…

I think that’s your problem.

When you built ruby, you were missing the zlib header files (probably a  
package called “zlib-devel”), and so ruby skipped building the zlib  
extension.

Before you rebuild, I suggest you also check you have the openssl-devel  
package installed, otherwise you won’t be able to use things like  
Net::HTTPS.

---

<div class="post-metadata">

**Author:** ![Zark\_Yoc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e19adc/32.png) [@Zark\_Yoc](https://www.ruby-forum.com/u/Zark_Yoc)\
**Post date:** [September 17, 2010, 1:10pm UTC](https://www.ruby-forum.com/t/a-problem-with-gem/195113/4 "2010-09-17T13:10:47Z")

</div>

At 2010-09-17 03:26AM, “Brian C.” wrote:  
[…]

> Before you rebuild, I suggest you also check you have the openssl-devel  
> package installed, otherwise you won’t be able to use things like  
> Net::HTTPS.

In my (brief) experience (building Ruby in Cygwin), in addition to the  
openssl devel package, you’ll need to:

```
cd [ruby_src]/ext/openssl
ruby extconf.rb
make
make install
```

---

<div class="post-metadata">

**Author:** ![Zark\_Yoc](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/e19adc/32.png) [@Zark\_Yoc](https://www.ruby-forum.com/u/Zark_Yoc)\
**Post date:** [September 17, 2010, 3:30pm UTC](https://www.ruby-forum.com/t/a-problem-with-gem/195113/5 "2010-09-17T15:30:44Z")

</div>

Glenn J. wrote:

> At 2010-09-17 03:26AM, “Brian C.” wrote:  
> […]
> 
> > Before you rebuild, I suggest you also check you have the openssl-devel  
> > package installed, otherwise you won’t be able to use things like  
> > Net::HTTPS.
> 
> In my (brief) experience (building Ruby in Cygwin), in addition to the  
> openssl devel package, you’ll need to:
> 
> ```
> cd [ruby_src]/ext/openssl
> ruby extconf.rb
> make
> make install
> 
> ```

In Unix that shouldn’t be necessary, as long as openssl-devel was  
available at the time you did ./configure
