# Error Using Bewildr Gem in V1.1.2

**URL:** <https://www.ruby-forum.com/t/error-using-bewildr-gem-in-v1-1-2/202963>\
**Category:** IronRuby\
**Created:** [February 9, 2011, 7:51pm UTC](https://www.ruby-forum.com/t/error-using-bewildr-gem-in-v1-1-2/202963 "2011-02-09T19:51:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [February 9, 2011, 7:51pm UTC](https://www.ruby-forum.com/t/error-using-bewildr-gem-in-v1-1-2/202963/1 "2011-02-09T19:51:54Z")

</div>

* * *

Ironruby-core mailing list  
removed\_email\_address@domain.invalid  
[http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)

---

<div class="post-metadata">

**Author:** ![JonesS\_Larry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f9ae1b/32.png) [@JonesS\_Larry](https://www.ruby-forum.com/u/JonesS_Larry)\
**Post date:** [February 9, 2011, 8:00pm UTC](https://www.ruby-forum.com/t/error-using-bewildr-gem-in-v1-1-2/202963/2 "2011-02-09T20:00:43Z")

</div>

Hi Larry,

undefined method `flatten’ for {:name=\>“Modeling”}:Hash (NoMethodError)

> 

I can reproduce this here as well: [flatten.txt · GitHub](https://gist.github.com/819024)

My understanding is that Hash#flatten only exist on 1.9 and not on 1.8.

Is there a regression here maybe ?

– Thibaut

---

<div class="post-metadata">

**Author:** ![JonesS\_Larry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f9ae1b/32.png) [@JonesS\_Larry](https://www.ruby-forum.com/u/JonesS_Larry)\
**Post date:** [February 9, 2011, 10:20pm UTC](https://www.ruby-forum.com/t/error-using-bewildr-gem-in-v1-1-2/202963/3 "2011-02-09T22:20:44Z")

</div>

One possible explanation is following: If you run the gem with IronRuby  
1.0 it runs in 1.8.6 compat mode. There may be a condition that checks  
for the RUBY\_VERSION in the gem. On Ruby 1.1.2 the RUBY\_VERSION is 1.9.2  
and thus some other code path might be executed that depends on  
Hash#flatten. I don’t think we regressed, it’s just a missing feature.  
Feel free to implement it and send a pull request.

Tomas

From: removed\_email\_address@domain.invalid  
[[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] On Behalf Of Thibaut Barrre  
Sent: Wednesday, February 09, 2011 11:00 AM  
To: removed\_email\_address@domain.invalid  
Subject: Re: [Ironruby-core] Error Using Bewildr Gem in V1.1.2

Hi Larry,  
undefined method `flatten’ for {:name=\>“Modeling”}:Hash (NoMethodError)

I can reproduce this here as well: [flatten.txt · GitHub](https://gist.github.com/819024)

My understanding is that Hash#flatten only exist on 1.9 and not on 1.8.

Is there a regression here maybe ?

– Thibaut

---

<div class="post-metadata">

**Author:** ![JonesS\_Larry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f9ae1b/32.png) [@JonesS\_Larry](https://www.ruby-forum.com/u/JonesS_Larry)\
**Post date:** [February 10, 2011, 10:33am UTC](https://www.ruby-forum.com/t/error-using-bewildr-gem-in-v1-1-2/202963/4 "2011-02-10T10:33:25Z")

</div>

Hi Thomas,

> One possible explanation is following: If you run the gem with IronRuby 1.0  
> it runs in 1.8.6 compat mode. There may be a condition that checks for the  
> RUBY\_VERSION in the gem. On Ruby 1.1.2 the RUBY\_VERSION is 1.9.2 and thus  
> some other code path might be executed that depends on Hash#flatten. I dont  
> think we regressed, its just a missing feature. Feel free to implement it  
> and send a pull request.

I’ll take this one, now that I’ve got the build working on Mac OS X.

I will ask you tips if I meet issues while running the test suite there.

– Thibaut

---

<div class="post-metadata">

**Author:** ![JonesS\_Larry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f9ae1b/32.png) [@JonesS\_Larry](https://www.ruby-forum.com/u/JonesS_Larry)\
**Post date:** [February 10, 2011, 10:47pm UTC](https://www.ruby-forum.com/t/error-using-bewildr-gem-in-v1-1-2/202963/5 "2011-02-10T22:47:50Z")

</div>

Fixed! I’ve just pushed a new version of bewildr (0.1.11) to allow  
running under ironruby 1.1.1 and 1.1.2. You can read about the fix here:  
[http://www.natontesting.com/2011/02/10/bewildr-and-ironruby-1-1-2/](http://www.natontesting.com/2011/02/10/bewildr-and-ironruby-1-1-2/)

---

<div class="post-metadata">

**Author:** ![JonesS\_Larry](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f9ae1b/32.png) [@JonesS\_Larry](https://www.ruby-forum.com/u/JonesS_Larry)\
**Post date:** [February 11, 2011, 12:04am UTC](https://www.ruby-forum.com/t/error-using-bewildr-gem-in-v1-1-2/202963/6 "2011-02-11T00:04:46Z")

</div>

Thanks for the quick fix!

* * *

Larry J.  
||| Senior Level Development Engineer  
Aspen Technology, Inc. ||| +1 281-504-3324 ||| fax: 281-584-1062 |||

> **[AspenTech | Asset Optimization Software - Asset Performance Management,...](https://www.aspentech.com/en/)**
>
> Our software tackles the most complex process manufacturing challenges, creating value and improving profitability for our customers. The industries that drive our economies and touch our lives are optimized by aspenONE software every day. The...
