I just compiled klayout against a static libruby (version 1.9.3-p0) and I keep getting the following error:
Ruby error: 'cannot load such file -- hello_world.rb' (LoadError)
Is 1.9.3 not supported? A brief look over the code indicates that it should be supported. Any ideas why this might be happening? Is there any more information I can provide to help debug?
Comments
puts $:
Statically linked 1.9.3 doesn't have "." in the ruby search path.
klayout -r ./hello_world.rb
worked for me.
Hi Stefan,
thanks for the hint regarding statically linked ruby. I did not know that it behaves differently compared to the dynamically linked one.
Best regards,
Matthias
Apparently it does not have to do with the linking mode, but they dropped the "." in Ruby 1.9.2. Here is a discussion thread about that: http://stackoverflow.com/questions/4965556/why-isnt-current-directory-on-my-ruby-path.
The solution appears to set the RUBYLIB environment variable to "." (which adds ".") or specify the script path explicitly. However, lacking a 1.9.2 ruby installation right now I did not test that myself.
Best regards,
Matthias