# Undefined method \`ire' with rubygems on mswin32

**URL:** <https://www.ruby-forum.com/t/undefined-method-ire-with-rubygems-on-mswin32/186935>\
**Category:** Ruby\
**Created:** [April 14, 2010, 4:18pm UTC](https://www.ruby-forum.com/t/undefined-method-ire-with-rubygems-on-mswin32/186935 "2010-04-14T16:18:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![aawilson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@aawilson](https://www.ruby-forum.com/u/aawilson)\
**Post date:** [April 14, 2010, 4:18pm UTC](https://www.ruby-forum.com/t/undefined-method-ire-with-rubygems-on-mswin32/186935/1 "2010-04-14T16:18:23Z")

</div>

I’ve just recently installed the latest stable ruby 1.9.1 and rubygems  
1.3.6 on a WinXP 32-bit system that’s never seen ruby before, as well as  
the dll packages listen at  
[http://www.garbagecollect.jp/ruby/mswin32/en/documents/install.html](http://www.garbagecollect.jp/ruby/mswin32/en/documents/install.html).  
PATH is set and correct. When running any gem command (but not when  
running other options, like gem --help, or gem -v), I receive the  
following:

C:\>gem list --local  
ERROR: While executing gem … (NoMethodError)  
undefined method `ire’ for main:Object

Running with debug gives this:

C:\>gem list --local --debug  
Exception `NameError' at C:/scripting/ruby-1.9.1/lib/ruby/site_ruby/1.9.1/rubyge ms/command_manager.rb:163 - uninitialized constant Gem::Commands::ListCommand Exception `NoMethodError’ at  
C:/scripting/ruby-1.9.1/lib/ruby/site\_ruby/1.9.1/ru  
bygems/commands/list\_command.rb:1 - undefined method `ire' for main:Object Exception `NoMethodError’ at  
C:/scripting/ruby-1.9.1/lib/ruby/site\_ruby/1.9.1/ru  
bygems/command\_manager.rb:169 - undefined method `ire' for main:Object ERROR: While executing gem ... (NoMethodError) undefined method `ire’ for main:Object  
C:/scripting/ruby-1.9.1/lib/ruby/site\_ruby/1.9.1/rubygems/commands/list\_  
command.rb:1:in `<top (required)>' C:/scripting/ruby-1.9.1/lib/ruby/site_ruby/1.9.1/rubygems/command_manage r.rb:169:in `require’  
C:/scripting/ruby-1.9.1/lib/ruby/site\_ruby/1.9.1/rubygems/command\_manage  
r.rb:169:in `rescue in load_and_instantiate' C:/scripting/ruby-1.9.1/lib/ruby/site_ruby/1.9.1/rubygems/command_manage r.rb:161:in `load\_and\_instantiate’  
C:/scripting/ruby-1.9.1/lib/ruby/site\_ruby/1.9.1/rubygems/command\_manage  
r.rb:90:in `[]' C:/scripting/ruby-1.9.1/lib/ruby/site_ruby/1.9.1/rubygems/command_manage r.rb:146:in `find\_command’  
C:/scripting/ruby-1.9.1/lib/ruby/site\_ruby/1.9.1/rubygems/command\_manage  
r.rb:133:in `process_args' C:/scripting/ruby-1.9.1/lib/ruby/site_ruby/1.9.1/rubygems/command_manage r.rb:104:in `run’  
C:/scripting/ruby-1.9.1/lib/ruby/site\_ruby/1.9.1/rubygems/gem\_runner.rb:  
58:in `run' C:/scripting/ruby-1.9.1/bin/gem:21:in `’

Thoughts?

---

<div class="post-metadata">

**Author:** ![aawilson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@aawilson](https://www.ruby-forum.com/u/aawilson)\
**Post date:** [April 14, 2010, 5:20pm UTC](https://www.ruby-forum.com/t/undefined-method-ire-with-rubygems-on-mswin32/186935/2 "2010-04-14T17:20:22Z")

</div>

Aa Wilson wrote:

> I’ve just recently installed the latest stable ruby 1.9.1 and rubygems  
> 1.3.6 on a WinXP 32-bit system that’s never seen ruby before, as well as  
> the dll packages listen at  
> [http://www.garbagecollect.jp/ruby/mswin32/en/documents/install.html](http://www.garbagecollect.jp/ruby/mswin32/en/documents/install.html).  
> PATH is set and correct. When running any gem command (but not when  
> running other options, like gem --help, or gem -v), I receive the  
> following:
> 
> C:\>gem list --local  
> ERROR: While executing gem … (NoMethodError)  
> undefined method `ire’ for main:Object

As a follow-up, checking the source of (for example)  
C:/scripting/ruby-1.9.1/lib/ruby/site\_ruby/1.9.1/rubygems/commands/list\_command.rb  
shows that, rather than “require ‘rubygems/command’” at the top, it has  
“ire ‘rubygems/command’”. This sounds like an installer problem.

---

<div class="post-metadata">

**Author:** ![aawilson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@aawilson](https://www.ruby-forum.com/u/aawilson)\
**Post date:** [April 14, 2010, 5:23pm UTC](https://www.ruby-forum.com/t/undefined-method-ire-with-rubygems-on-mswin32/186935/3 "2010-04-14T17:23:04Z")

</div>

What does the first line of

C:/scripting/ruby-1.9.1/lib/ruby/site\_ruby/1.9.1/rubygems/commands/list\_command.rb:1

contain?

Could the ‘require’ have been changed to ‘ire’ somehow?

---

<div class="post-metadata">

**Author:** ![aawilson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@aawilson](https://www.ruby-forum.com/u/aawilson)\
**Post date:** [April 14, 2010, 6:08pm UTC](https://www.ruby-forum.com/t/undefined-method-ire-with-rubygems-on-mswin32/186935/4 "2010-04-14T18:08:31Z")

</div>

Aa Wilson wrote:

> As a further follow-up, this was the case for a great number of the  
> source files (possibly all–I didn’t count, just did a find-replace).  
> Also, certain other rubygems source files have the first few characters  
> chopped off–for instance,  
> C:\scripting\ruby-1.9.1\lib\ruby\site\_ruby\1.9.1\rubygems\package\tar\_input.rb  
> has “- coding: iso-8859-1 -_-", which should (probably) actually be "#–  
> coding: iso-8859-1 -_-”.

One last-followup, with a workaround.

A large number (the majority) of the files in the rubygems directory  
noted above were missing the first four characters. Since the files in  
ruby-1.9.1\lib\ruby\site\_ruby\1.9.1\rubygems were copies of the files in  
rubygems-1.3.6\lib\rubygems, copying the contents of the latter into  
the former resolved this issue.

---

<div class="post-metadata">

**Author:** ![aawilson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@aawilson](https://www.ruby-forum.com/u/aawilson)\
**Post date:** [April 14, 2010, 5:46pm UTC](https://www.ruby-forum.com/t/undefined-method-ire-with-rubygems-on-mswin32/186935/5 "2010-04-14T17:46:05Z")

</div>

Brian C. wrote:

> What does the first line of
> 
> C:/scripting/ruby-1.9.1/lib/ruby/site\_ruby/1.9.1/rubygems/commands/list\_command.rb:1
> 
> contain?
> 
> Could the ‘require’ have been changed to ‘ire’ somehow?

Please see my previous reply for the answer to this question. The short  
answer is ‘yes’.

As a further follow-up, this was the case for a great number of the  
source files (possibly all–I didn’t count, just did a find-replace).  
Also, certain other rubygems source files have the first few characters  
chopped off–for instance,  
C:\scripting\ruby-1.9.1\lib\ruby\site\_ruby\1.9.1\rubygems\package\tar\_input.rb  
has “- coding: iso-8859-1 -_-", which should (probably) actually be "#–  
coding: iso-8859-1 -_-”.

---

<div class="post-metadata">

**Author:** ![aawilson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@aawilson](https://www.ruby-forum.com/u/aawilson)\
**Post date:** [April 14, 2010, 9:02pm UTC](https://www.ruby-forum.com/t/undefined-method-ire-with-rubygems-on-mswin32/186935/6 "2010-04-14T21:02:41Z")

</div>

Luis L. wrote:

> On Apr 14, 1:08ï¿½pm, Aa Wilson [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> The problem might be related to the version of Ruby 1.9.1 you’re  
> using.
> 
> can you tell us which version of Ruby 1.9.1 are you using? (ruby -v)

ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mswin32]

> What is the language of your installation and your console encoding?  
> (chcp)

English installation.

chcp output is:  
Active code page: 437

> RubyInstaller do not present this issue. Can you test downloading  
> 1.9.1 of RC2 and manually install RubyGems 1.3.6 on top of it?

That’s a bit more trouble than I’m willing to go through immediately,  
since the workaround has resolved the problem, although I might be able  
to follow up some more at home and give you some data. Thanks for the  
pointer to rubyinstaller, I didn’t know that existed.

---

<div class="post-metadata">

**Author:** ![aawilson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@aawilson](https://www.ruby-forum.com/u/aawilson)\
**Post date:** [April 14, 2010, 6:30pm UTC](https://www.ruby-forum.com/t/undefined-method-ire-with-rubygems-on-mswin32/186935/7 "2010-04-14T18:30:45Z")

</div>

On Apr 14, 1:08 pm, Aa Wilson [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> One last-followup, with a workaround.
> 
> A large number (the majority) of the files in the rubygems directory  
> noted above were missing the first four characters. Since the files in  
> ruby-1.9.1\lib\ruby\site\_ruby\1.9.1\rubygems were copies of the files in  
> rubygems-1.3.6\lib\rubygems, copying the contents of the latter into  
> the former resolved this issue.

The problem might be related to the version of Ruby 1.9.1 you’re  
using.

can you tell us which version of Ruby 1.9.1 are you using? (ruby -v)

Also, to the encoding of your Windows installation.

What is the language of your installation and your console encoding?  
(chcp)

Chopping the first characters might be a UTF encoding issue.

RubyInstaller do not present this issue. Can you test downloading  
1.9.1 of RC2 and manually install RubyGems 1.3.6 on top of it?

More details here:

> **[RubyInstaller for Windows](https://rubyinstaller.org/)**
>
> The easy way to install Ruby on Windows This is a self-contained Windows-based installer that includes the Ruby language, an execution environment, important...

---

<div class="post-metadata">

**Author:** ![aawilson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@aawilson](https://www.ruby-forum.com/u/aawilson)\
**Post date:** [May 11, 2010, 3:45pm UTC](https://www.ruby-forum.com/t/undefined-method-ire-with-rubygems-on-mswin32/186935/8 "2010-05-11T15:45:09Z")

</div>

A quick follow-up to this:  
Using the One-Click installer with rails 1.9.1 produced the same issue.  
Reverting to 1.8.7 did NOT.

-AW

Aa Wilson wrote:

> Luis L. wrote:
> 
> > On Apr 14, 1:08ï¿½pm, Aa Wilson [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> > 
> > The problem might be related to the version of Ruby 1.9.1 you’re  
> > using.
> > 
> > can you tell us which version of Ruby 1.9.1 are you using? (ruby -v)
> 
> ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mswin32]
> 
> > What is the language of your installation and your console encoding?  
> > (chcp)
> 
> English installation.
> 
> chcp output is:  
> Active code page: 437
> 
> > RubyInstaller do not present this issue. Can you test downloading  
> > 1.9.1 of RC2 and manually install RubyGems 1.3.6 on top of it?
> 
> That’s a bit more trouble than I’m willing to go through immediately,  
> since the workaround has resolved the problem, although I might be able  
> to follow up some more at home and give you some data. Thanks for the  
> pointer to rubyinstaller, I didn’t know that existed.
