RubyCocoa LoadError

Discussion in 'Ruby' started by Gianni C, Dec 2, 2007.

  1. Gianni C

    Gianni C Guest

    Hey Rubyists,

    I'm trying to use the RubyCocoa framework, but I am getting a
    LoadError:

    `require': no such file to load -- osx/cocoa (LoadError)

    RubyCocoa is installed, and *all* the sample applications work
    perfectly. Even when I include the correct path (/Library/Frameworks/
    RubyCocoa.framework/Resources/ruby/) I get an even better error:

    /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/
    oc_import.rb:14: warning: already initialized constant FRAMEWORK_PATHS
    /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/
    oc_import.rb:19: warning: already initialized constant SIGN_PATHS
    /Library/Frameworks/RubyCocoa.framework/Resources/ruby/osx/objc/
    oc_import.rb:26: warning: already initialized constant PRE_SIGN_PATHS
    NameError: uninitialized constant OSX::RUBYCOCOA_FRAMEWORK_PATHS
    from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/
    osx/objc/oc_import.rb:29
    from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/
    osx/objc/oc_all.rb:9:in `require'
    from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/
    osx/objc/oc_all.rb:9
    from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/
    osx/objc/foundation.rb:8:in `require'
    from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/
    osx/objc/foundation.rb:8
    from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/
    osx/objc/cocoa.rb:8:in `require'
    from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/
    osx/objc/cocoa.rb:8
    from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/
    osx/cocoa.rb:8:in `require'
    from /Library/Frameworks/RubyCocoa.framework/Resources/ruby/
    osx/cocoa.rb:8
    from (irb):4:in `require'
    from (irb):4

    Here is my require code:

    require 'osx/cocoa'
    include OSX
    OSX.require_framework 'AddressBook'

    Any Idea on what my problem is? I'm sure it's just something silly I
    have missed. Thanks in advance,

    Gianni C
    Gianni C, Dec 2, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Oliver Obst
    Replies:
    4
    Views:
    116
    Oliver Obst
    Sep 29, 2003
  2. Ruby Ruby
    Replies:
    0
    Views:
    189
    Ruby Ruby
    Apr 22, 2004
  3. Thursday
    Replies:
    1
    Views:
    77
    Thursday
    Jan 10, 2005
  4. Richard Turner

    mod_ruby require LoadError

    Richard Turner, Jan 26, 2005, in forum: Ruby
    Replies:
    1
    Views:
    107
    Richard Turner
    Jan 26, 2005
  5. anne001
    Replies:
    4
    Views:
    136
    Jaypee
    Nov 16, 2005
Loading...

Share This Page