Unable to run the code using RubyMine editor

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

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’

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.

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.