# Unable to run the code using RubyMine editor

**URL:** <https://www.ruby-forum.com/t/unable-to-run-the-code-using-rubymine-editor/192825>\
**Category:** wxRuby\
**Created:** [August 6, 2010, 1:30pm UTC](https://www.ruby-forum.com/t/unable-to-run-the-code-using-rubymine-editor/192825 "2010-08-06T13:30:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kavitha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/edb3f5/32.png) [@kavitha](https://www.ruby-forum.com/u/kavitha)\
**Post date:** [August 6, 2010, 1:30pm UTC](https://www.ruby-forum.com/t/unable-to-run-the-code-using-rubymine-editor/192825/1 "2010-08-06T13:30:43Z")

</div>

I am new to Ruby and in the process of learning wxruby.

Installed wxruby then I have created a simple ruby code

I first went to wxruby\ruby\bin and typed ruby wxruby.rb  
The UI got displayed and everything worked fine.

But when I try to run the same code attached using Jet Brains RubyMine  
editor.

The error message that I am geting is given below

C:\Ruby19\bin\ruby.exe -e  
STDOUT.sync=true;STDERR.sync=true;load($0=ARGV.shift)  
D:/wxruby/ruby/bin/wxruby.rb  
C:/Ruby19/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mingw32/lib/wx.rb:12:in  
`require': 126: The specified module could not be found. - C:/Ruby19/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mingw32/lib/wxruby2.so (LoadError) from C:/Ruby19/lib/ruby/gems/1.9.1/gems/wxruby-2.0.1-x86-mingw32/lib/wx.rb:12:in`\<top (required)\>’  
from D:/wxruby/ruby/bin/wxruby.rb:1:in `require' from D:/wxruby/ruby/bin/wxruby.rb:1:in`\<top (required)\>’  
from -e:1:in `load' from -e:1:in`’

Process finished with exit code 1

After running through RubyMine editor when I again went back command  
prompt and then to bin directory in the location where wxruby was  
installed as wxruby\ruby\bin and executed using ruby wxruby.rb the same  
error popped up. Initially this was working fine. After executing  
through RubyMineeditor even from command prompt in bin directory it  
fails with the same error.

Please help me how to solve the problem

Thanks in advance  
Kavitha

---

<div class="post-metadata">

**Author:** ![kavitha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/edb3f5/32.png) [@kavitha](https://www.ruby-forum.com/u/kavitha)\
**Post date:** [August 6, 2010, 2:07pm UTC](https://www.ruby-forum.com/t/unable-to-run-the-code-using-rubymine-editor/192825/2 "2010-08-06T14:07:55Z")

</div>

Hello, from my perspective this looks that you may not have set the gems  
path correctly in the editor. I have never used RubyMine, though. Google  
responsed with  
| File | Settings | Ruby SDK and Gems |. Check there and see if you can correct anything.

I can recomment NetBeans if you still get into issues. After installing  
the Ruby bundle, go to Tools-\>Ruby platforms-\>Add platform-\> and select  
“path\_to\_your\_ruby/bin/ruby.exe”

Also, I see that you are running the 1.9 branch of Ruby. In this case  
make sure you have wxruby-ruby19 installed. If you have just ‘wxruby’  
gem installed, remove it and ‘gem install wxruby-ruby19’

---

<div class="post-metadata">

**Author:** ![kavitha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/edb3f5/32.png) [@kavitha](https://www.ruby-forum.com/u/kavitha)\
**Post date:** [August 6, 2010, 2:45pm UTC](https://www.ruby-forum.com/t/unable-to-run-the-code-using-rubymine-editor/192825/3 "2010-08-06T14:45:01Z")

</div>

Kredaxx P. wrote:

> Hello, from my perspective this looks that you may not have set the gems  
> path correctly in the editor. I have never used RubyMine, though. Google  
> responsed with  
> | File | Settings | Ruby SDK and Gems |. Check there and see if you can correct anything.
> 
> I can recomment NetBeans if you still get into issues. After installing  
> the Ruby bundle, go to Tools-\>Ruby platforms-\>Add platform-\> and select  
> “path\_to\_your\_ruby/bin/ruby.exe”
> 
> Also, I see that you are running the 1.9 branch of Ruby. In this case  
> make sure you have wxruby-ruby19 installed. If you have just ‘wxruby’  
> gem installed, remove it and ‘gem install wxruby-ruby19’

Thankyou for the response,

But I made sure that I have set the environment correctly.

In Rubymine we set the environment in File-\>Settings-\>Project Structure  
as D:\wxruby\ruby\bin\rubyw.exe  
and I have installed the required gems also.  
I have installed wxruby-ruby19 which come as as a single installation  
package with wxruby installer.I am using Windows XP.

But still the same error pops up. Please help if you have any other  
ideas.

---

<div class="post-metadata">

**Author:** ![kavitha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/edb3f5/32.png) [@kavitha](https://www.ruby-forum.com/u/kavitha)\
**Post date:** [August 6, 2010, 7:03pm UTC](https://www.ruby-forum.com/t/unable-to-run-the-code-using-rubymine-editor/192825/4 "2010-08-06T19:03:00Z")

</div>

You have the wrong WxRuby installed. You have Ruby1.9.1 installed, so  
you have to have WxRuby19 to work with it. You’re currently using the  
WxRuby for Ruby1.8.

That should get you past the first large hurdle of problems.
