How to reduce time until simulator window opens? (now 2 min !)


Recently the time until the simulator opens gets longer and longer even though I have not added much more programming.
Meanwhile I have to wait for 2 Minutes.

Using Atom as an editor, I did realize that the above mentioned time increased when renaming folders within the app / screens section of the editor…

My MacBook Pro mid 2012 with 2,6 GHz and 16 GB DDR3 RAM is not the fastest, but hardware should. bot be the problem.

When pressing ‘rake’ In iTerm2 these lines are being displayed within seconds…

Generating Data Model plus123
Loading schemas/0001_initial.rb
Writing resources/plus123.xcdatamodeld/0001 initial.xcdatamodel/contents
Build ./build/iPhoneSimulator-11.0-Development
Build /Users/daniel0/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/motion-yaml-1.4/lib/YAMLKit
Build /Users/daniel0/.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/gems/cdq-1.0.8/lib/…/vendor/cdq/ext

Then it takes almost two minutes until these lines appear:

  Link ./build/iPhoneSimulator-11.0-Development/

Compile ./resources/plus123.xcdatamodeld
Create ./build/iPhoneSimulator-11.0-Development/
Copy ./resources/plus123.momd/VersionInfo.plist
Copy ./resources/plus123.momd/0001 initial.omo
Copy ./resources/plus123.momd/0001
Create ./build/iPhoneSimulator-11.0-Development/
Copy ./build/iPhoneSimulator-11.0-Development/
Simulate /Users/daniel0/rubymotion/plus123/build/iPhoneSimulator-11.0-Development/
(main)> Type pm_live to enable ProMotion’s live reload system.

And shortly afterwards the simulator window opens.

I do not run the latest RubyMotion version as occasionally I had run into severe problems when upgrading.
At the moment in the Rakefile it says: 'app.sdk_version = “11.0”

Recently I had run, hoping that this would resolve the problem …

  • bundle exec rake clean
  • bundle exec bundle install
  • bundle exec rake pod:install

But it didn’t

I’d be very grateful for help!



Hi @dotvo,

I had a similar behavior like you’ve described. I found out (by canceling the rake script) that it must have something to do with the dependency.rb file of rubymotion. It seem that my dependencies are not perfectly setup. Because I have too much files in my project already - I’ve ended up by changing the file directly. Maybe this helps you with your problem as well:

File is stored in `/Library/RubyMotion/lib/motion/project/dependency.rb

# new code added by me
require 'digest'

def write_cache(result, dependencies, def_path, ref_path)
  cached[cache_key(def_path, ref_path)] = result

def cache_key(def_path, ref_path)

def cached
  @cached ||= {}

def cached_value(def_path, ref_path)
  cached[cache_key(def_path, ref_path)]

def store_cache
  # TODO maybe store files for the next rake

# I've added the cache check to prevent loops
def cyclic?(dependencies, def_path, ref_path)
  cache = cached_value(def_path, ref_path)
  return cache if cache != nil

  deps = dependencies[def_path]
  if deps
    if deps.include?(ref_path)
      return true
    deps.each do |file|
      if cyclic?(dependencies, file, ref_path)
        return true
  write_cache(false, dependencies, def_path, ref_path)


Hope that helps, maybe someone can explain how to prevent the loops in the first place :slight_smile:



Hi @torben,

thanks for putting this down!
As this is far beyond my understanding of scripts I will get in touch with a friend who hopefully understands it all and possibly could change the script of the dependency.rb.

I’ll be informing about what happens.

Thanks again,


@John Garhardt on slack may be able to help with this too. DM me there if you want to do some realtime trouble shooting.

The inner workings of dependency.rb were discussed during this meetup. It may be worth watching:


Hi @torben,

we are not sure how to apply the code you sent.
Would you mind explaining?

Our guess is: the content of the file is supposed to be copied into a new file "auto-build.rb. Then ‘ruby auto-build.rb’ has to be written into the terminal. Right?