【问题标题】:XCode and RubyMotion - rake spec - permission errorXCode 和 RubyMotion - rake 规范 - 权限错误
【发布时间】:2018-05-02 17:26:47
【问题描述】:

我正在尝试在我的 Mac (High Sierra) 上运行 RubyMotion 设置。

在我尝试实施测试之前,一切都很好。当我运行rake 时,我可以让 iPhone 模拟器运行并在我的屏幕上看到我的应用程序。

RubyMotion 生成一个默认规范文件spec/main_spec.rb,每当我尝试从新创建的项目(运动创建项目)运行rake spec 时,我都会收到以下错误:

Cannot write into the `/Users/bruger/Library/RubyMotion/build' directory, please remove or check permissions and try again.

奇怪的是:RubyMotion文件夹中没有这样的文件夹,而另一个文件夹是为所有者(我)读取、写入和执行的。

当我通过成功的测试运行查看others example 时,我可以看到他们的代码是从当前文件夹中调用的,如下所示:

Build ./some_path
Compile ./some_other_path
Link ./some_third_path

如果我使用--trace 运行相同的命令,我会得到以下输出:

** Invoke spec (first_time)
** Invoke spec:simulator (first_time)
** Execute spec:simulator
** Invoke simulator (first_time)
** Execute simulator
** Invoke build:simulator (first_time)
** Execute build:simulator
rm -f ./build/iPhoneSimulator-11.3-Development/APP_spec.app/Info.plist
Cannot write into the `/Users/bruger/Library/RubyMotion/build' directory, please remove or check permissions and try again.

所以它试图从基于当前文件夹的路径中删除 Info.plist,然后在完全不同的文件夹中获得权限错误?

这是为什么?

【问题讨论】:

    标签: xcode rspec rubymotion


    【解决方案1】:

    请尝试以下步骤来帮助诊断您的问题:

    1. 确保您已安装最新版本的 Xcode,并且 Xcode 已启动,并且所有组件均已安装。
    2. sudo motion update 这将确保您拥有最新版本的 RubyMotion、模板等。
    3. 从头开始创建一个新项目,然后运行rake spec

    另请注意,RubyMotion 社区在 Slack 上最为活跃,您将在那里更快地获得答案。你可以加入https://motioneers.herokuapp.com

    【讨论】:

    • 感谢您的帮助@wndxlori,但我决定选择普通的 Swift。 :)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-19
    • 1970-01-01
    相关资源
    最近更新 更多