# Problem requiring gems under 1.9.1 mingw

**URL:** <https://www.ruby-forum.com/t/problem-requiring-gems-under-1-9-1-mingw/180359>\
**Category:** Ruby\
**Created:** [December 18, 2009, 12:21pm UTC](https://www.ruby-forum.com/t/problem-requiring-gems-under-1-9-1-mingw/180359 "2009-12-18T12:21:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![micheldogger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5e925/32.png) [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Post date:** [December 18, 2009, 12:21pm UTC](https://www.ruby-forum.com/t/problem-requiring-gems-under-1-9-1-mingw/180359/1 "2009-12-18T12:21:42Z")

</div>

I have both 1.8.6 and 1.9.1 (both mingw under windows).

My code requires windows-api, which requires win32-api. It works under  
1.8. Under 1.9, I get :

F:/Ruby19/lib/ruby/gems/1.9.1/gems/windows-api-0.4.0/lib/windows/api.rb:1:in  
`require': no such file to load -- win32-api (LoadError) from F:/Ruby19/lib/ruby/gems/1.9.1/gems/windows-api-0.4.0/lib/windows/api.rb:1:in`\<top (required)\>’

The loaded gems are the same under 1.8 and 1.9 :  
The win32-api gem is the mswin32 one : win32-api-1.4.5-x86-mswin32-60.

Any idea ? Thanks !

---

<div class="post-metadata">

**Author:** ![micheldogger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5e925/32.png) [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Post date:** [December 18, 2009, 4:25pm UTC](https://www.ruby-forum.com/t/problem-requiring-gems-under-1-9-1-mingw/180359/2 "2009-12-18T16:25:51Z")

</div>

On Dec 18, 8:21 am, Michel D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> The loaded gems are the same under 1.8 and 1.9 :  
> The win32-api gem is the mswin32 one : win32-api-1.4.5-x86-mswin32-60.
> 
> Any idea ? Thanks !

1. You’re using pre-compiled version of gems that are made to work on  
1.8, not 1.9

Please install the DevKit for the MinGW version of Ruby and try  
install the gem again.

---

<div class="post-metadata">

**Author:** ![micheldogger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5e925/32.png) [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Post date:** [December 18, 2009, 5:50pm UTC](https://www.ruby-forum.com/t/problem-requiring-gems-under-1-9-1-mingw/180359/3 "2009-12-18T17:50:27Z")

</div>

Luis L. wrote:

> On Dec 18, 8:21ï¿½am, Michel D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > The loaded gems are the same under 1.8 and 1.9 :  
> > The win32-api gem is the mswin32 one : win32-api-1.4.5-x86-mswin32-60.
> > 
> > Any idea ? Thanks !
> 
> 1. You’re using pre-compiled version of gems that are made to work on  
> 1.8, not 1.9
> 
> Please install the DevKit for the MinGW version of Ruby and try  
> install the gem again.

Additional note:

OP should use: require ‘windows/api’ and not require ‘windows-api’  
The latter causes error in both 1.8 and 1.9.

bbiker

---

<div class="post-metadata">

**Author:** ![micheldogger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5e925/32.png) [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Post date:** [December 18, 2009, 6:27pm UTC](https://www.ruby-forum.com/t/problem-requiring-gems-under-1-9-1-mingw/180359/4 "2009-12-18T18:27:08Z")

</div>

Bernard K. wrote:

> OP should use: require ‘windows/api’ and not require ‘windows-api’  
> The latter causes error in both 1.8 and 1.9.
> 
> bbiker

Yes, I should have written : my code requires windows-api by ‘require  
windows/api’

---

<div class="post-metadata">

**Author:** ![micheldogger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5e925/32.png) [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Post date:** [December 18, 2009, 6:48pm UTC](https://www.ruby-forum.com/t/problem-requiring-gems-under-1-9-1-mingw/180359/5 "2009-12-18T18:48:23Z")

</div>

Michel D. wrote:

> Luis L. wrote:
> 
> > On Dec 18, 8:21ï¿½am, Michel D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > 
> > > The loaded gems are the same under 1.8 and 1.9 :  
> > > The win32-api gem is the mswin32 one : win32-api-1.4.5-x86-mswin32-60.
> > > 
> > > Any idea ? Thanks !
> > 
> > 1. You’re using pre-compiled version of gems that are made to work on  
> > 1.8, not 1.9
> > 
> > Please install the DevKit for the MinGW version of Ruby and try  
> > install the gem again.
> 
> Thanks, Luis, I’ll try that.  
> BTW, many thanks for your very useful job on the installer !  
> MD

Worked most easily and perfectly !  
The devkit is as remarkable as the installer…  
Thanks again, Luis.  
Happy new year to all.  
MD

---

<div class="post-metadata">

**Author:** ![micheldogger](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/b5e925/32.png) [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Post date:** [December 18, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/problem-requiring-gems-under-1-9-1-mingw/180359/6 "2009-12-18T18:28:25Z")

</div>

Luis L. wrote:

> On Dec 18, 8:21ï¿½am, Michel D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > The loaded gems are the same under 1.8 and 1.9 :  
> > The win32-api gem is the mswin32 one : win32-api-1.4.5-x86-mswin32-60.
> > 
> > Any idea ? Thanks !
> 
> 1. You’re using pre-compiled version of gems that are made to work on  
> 1.8, not 1.9
> 
> Please install the DevKit for the MinGW version of Ruby and try  
> install the gem again.

Thanks, Luis, I’ll try that.  
BTW, many thanks for your very useful job on the installer !  
MD
