# Re: mspec error undefined method \`filtered' for	MSpecScript:Class

**URL:** <https://www.ruby-forum.com/t/re-mspec-error-undefined-method-filtered-for-mspecscript-class/166814>\
**Category:** IronRuby\
**Created:** [April 29, 2009, 8:53pm UTC](https://www.ruby-forum.com/t/re-mspec-error-undefined-method-filtered-for-mspecscript-class/166814 "2009-04-29T20:53:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [April 29, 2009, 8:53pm UTC](https://www.ruby-forum.com/t/re-mspec-error-undefined-method-filtered-for-mspecscript-class/166814/1 "2009-04-29T20:53:03Z")

</div>

The gem won’t work for now. Make sure that the mspec that runs is the  
Mspec in Merlin/External.LCA\_RESTRICTED.

JD

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [April 29, 2009, 8:58pm UTC](https://www.ruby-forum.com/t/re-mspec-error-undefined-method-filtered-for-mspecscript-class/166814/2 "2009-04-29T20:58:55Z")

</div>

Sounds like you’re not running Dev.bat. Before doing anything with  
IronRuby (when you get it from the git repo), please run  
Merlin/Main/Languages/Ruby/Scripts/Dev.bat. That will make sure things  
are all set up properly. To make this easy, just create a ironruby.bat  
file somewhere which calls Dev.bat. I even add that as the first  
shortcut in my quicklaunch toolbar so WIN+1 will launch a dev.bat  
cmd.exe window.

~js

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [April 29, 2009, 9:25pm UTC](https://www.ruby-forum.com/t/re-mspec-error-undefined-method-filtered-for-mspecscript-class/166814/3 "2009-04-29T21:25:27Z")

</div>

Thank you, I did run the dev.bat but still get same error. I’m  
investigating why it load from gems rather than what get in .mspecrc  
file.

Bests,

- Jirapong

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [April 29, 2009, 9:40pm UTC](https://www.ruby-forum.com/t/re-mspec-error-undefined-method-filtered-for-mspecscript-class/166814/4 "2009-04-29T21:40:46Z")

</div>

If you have RUBYOPTS set to “-rubygems” (as is done by default by the  
MRI one-click installer), RubyGems will get first shot at finding  
“mspec” and will look at installed gems before looking at $LOAD\_PATH.  
That could also be the issue. Just using the different version of  
mspec.bat may not fix the issue as it just runs the first “ruby.exe” it  
finds on the path, and could still get tripped up over the “-rubygems”  
issue…

Jim, how different are the two versions of mspec supposed to be? Do you  
know what the RubySpec team’s plan is to unify them? Do we know why the  
gem will not work, and is there a bug to track the issue?

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [April 29, 2009, 9:43pm UTC](https://www.ruby-forum.com/t/re-mspec-error-undefined-method-filtered-for-mspecscript-class/166814/5 "2009-04-29T21:43:07Z")

</div>

Thank you Jimmy. That’s work!

> gem uninstall mspec  
> del c:\ruby\bin\mspec\*

Bests,  
-Jirapong

---

<div class="post-metadata">

**Author:** ![raker\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecae2f/32.png) [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Post date:** [April 29, 2009, 9:30pm UTC](https://www.ruby-forum.com/t/re-mspec-error-undefined-method-filtered-for-mspecscript-class/166814/6 "2009-04-29T21:30:11Z")

</div>

It’s because the “mspec” command you’re running lives in your  
C:\ruby\bin directory, not  
C:…\ironruby\Merlin\External.LCA\_RESTRICTED\Languages\IronRuby\mspec\mspec\bin.  
Running “where mspec” should show something like this:

C:\dev\jschementi-ironruby\Merlin\Main\Languages\Ruby\>where mspec  
C:\dev\jschementi-ironruby\Merlin\External.LCA\_RESTRICTED\Languages\IronRuby\mspec\mspec\bin\mspec  
C:\dev\jschementi-ironruby\Merlin\External.LCA\_RESTRICTED\Languages\IronRuby\mspec\mspec\bin\mspec.bat

If you don’t really need the mspec gem installed, removing that would  
probably remedy this.
