Problem with require.
Hi, i've just installed RubyMine, and i'm having a really strange problem.
I started a new project and add two files: main.rb and gui.rb
That's the main.rb:
#begin main
require 'rubygems'
require 'gui'
my_app = Gui.new.main_loop
#end main
and gui.rb have some methods usins WxRuby.
When i run this code i get this error:
C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- gui (LoadError)
I don't understand! This exact code works on Netbeans and SciTE!
Do i have to configure something?
Please sign in to leave a comment.
Hello Dimas,
Are this files in the same folder? Which working directory is selected in run configuration for main.rb file?
I created empty project with two files - main.rb and gui.rb, than I ran main.rb from context menu, RubyMine created run configuration with project's root directory as working directory and I didn't get errors.
Thank you, man. That was this 'working directory' thing i haven't set.
Its working now.