Search code examples
ioscore-datarubymotion

CDQ permission error in RubyMotion


I have been attempting to follow this CDQ tutorial and ran into a permissions error when I attempted to run the app

learn-cdq btuman$ rake
Build ./build/iPhoneSimulator-7.1-Development
Build /Library/Ruby/Gems/2.0.0/gems/motion-yaml-1.2.1/lib/YAMLKit
rake aborted!
Errno::EACCES: Permission denied - build-iPhoneSimulator
/Library/RubyMotion/lib/motion/project/vendor.rb:138:in `block in build_static'
/Library/RubyMotion/lib/motion/project/vendor.rb:67:in `chdir'
/Library/RubyMotion/lib/motion/project/vendor.rb:67:in `build_static'
/Library/RubyMotion/lib/motion/project/vendor.rb:44:in `build'
/Library/RubyMotion/lib/motion/project/builder.rb:67:in `block in build'
/Library/RubyMotion/lib/motion/project/builder.rb:66:in `each'
/Library/RubyMotion/lib/motion/project/builder.rb:66:in `build'
/Library/RubyMotion/lib/motion/project/app.rb:78:in `build'
/Library/RubyMotion/lib/motion/project/template/ios.rb:68:in `block (2 levels) in <top (required)>'
/Library/RubyMotion/lib/motion/project/template/ios.rb:122:in `block in <top (required)>'
Tasks: TOP => build:simulator
(See full trace by running task with --trace)

I have added to both the first and second issue regarding this error on the CDQ github page, but have not had any responses yet.


Solution

  • Looks like this has possibly been fixed in the next (as yet unreleased) version of RubyMotion: http://hipbyte.myjetbrains.com/youtrack/issue/RM-553 (as reported by Watson)

    The issue appears to have crept in at some point after RM 2.26 (which is what I had at the time of writing that post) and looks to be an incompatibility between later versions of RM and the older version of CDQ specified in the tutorial (0.1.5).

    Updating to the latest version of CDQ (0.1.10 at time of writing) fixes the issue; I'm not sure what changed between now and then however.

    So in your Gemfile:

    gem 'cdq'
    # Or specify the latest version at time of writing
    # gem 'cdq', '0.1.10'
    

    And run bundle update cdq, or bundle install if this is a new app that you are setting up.