I’m working through the ‘picturebook.rb’ example in “FXRuby Create Lean
and Mean GUIs with Ruby” and got stuck embarrassingly early in the book.
I’m good up to the point that a blank window pops up (p 28). When I
proceed to add the other classes (p 30), errors result. The program
runs fine as shown, but when the commented lines are uncommented an
error message is shown (below).
Code that replicates p 30 with four lines commented out:
class PictureBook < FXMainWindow
super(app, “Picture Book”, :width => 600, :height => 400)
#photo = Photo.new(“bridge damage10.jpg”)
#photo_view = PhotoView.new(self, photo)
def create super show(PLACEMENT_SCREEN) end
if FILE == $0
FXApp.new do |app|
‘gem_original_require’: no such file to load – photo (LoadError)
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31: in
It seems like the fix would be to path the files so FXRuby can find
them, but I don’t know what path that would be?