require problem in NetBeans

  4 posts   Feedicon  
Replies: 3 - Last Post: January 24, 2010 22:00
by: regularfry
showing 1 - 4 of 4
Posted: January 24, 2010 13:12 by regularfry
This is such a simple problem I'm sure I've messed something up, but I've got absolutely no idea what it might be.

From a freshly monkeybar'd project, I make my section of main.rb look like this:

  # Your application code goes here
  require 'yaml'
rescue => e

That is, I just
require 'yaml'
- make no other changes to the project other than to add the jruby-complete and monkeybars-1.0.4 jars. When I build and run the project, I get an exception like this:

Java::OrgJrubyExceptions::RaiseException - org.jruby.exceptions.RaiseException: no such file to load -- date
yaml/rubytypes:2:in `require': no such file to load -- date (LoadError)
	from yaml/rubytypes:2
	from yaml/rubytypes:393:in `require'
	from yaml:393
	from yaml:50:in `require'
	from src/main.rb:50:in `require'
	from <script>:1
	...internal jruby stack elided...
	from Kernel.require(yaml/rubytypes:2)
	from (unknown).(unknown)(yaml/rubytypes:393)
	from Kernel.require(yaml:393)
	from (unknown).(unknown)(yaml:50)
	from Kernel.require(src/main.rb:50)
	from Kernel.require(<script>:1)
	from (unknown).(unknown)(:1)

It looks to me like the $LOAD_PATH isn't set properly; if I insert a
just before the
I get this:


I don't know why the jruby-complete jar doesn't appear in that list, but it seems strange that it should not.

Any ideas?
Posted: January 24, 2010 13:16 by regularfry
Just for completeness:
  • Platform is 64-bit Ubuntu Karmic
  • NetBeans is version 6.7.1
  • I have jruby 1.4.0 installed on the system via rvm
  • Monkeybars is version 1.0.4
  • Rawr is version 1.3.8
Posted: January 24, 2010 20:53 by Logan Barnett

Alex, 1.0.5 (which I released today), fixes this issue. JRuby made a change that broke our gem protection behavior (which was happening in manifest.rb). This is purely my fault - they gave me tons of notice.

For your project you already started, just comment out the $LOAD_PATH.clear calls at the top of src/manifest.rb.

Posted: January 24, 2010 22:00 by regularfry
Ah, ok. That works. Thanks for that.
Replies: 3 - Last Post: January 24, 2010 22:00
by: regularfry
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2014, Oracle Corporation and/or its affiliates
(revision 20160708.bf2ac18)
Please Confirm