Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing build error #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixing build error #6

wants to merge 1 commit into from

Conversation

marlabz6
Copy link

@marlabz6 marlabz6 commented Feb 4, 2016

rake aborted!
NoMethodError: undefined method start_with?' for #<Array:0x007ffb81278c40> /.rvm/gems/ruby-2.0.0-p481/bundler/gems/Flow-70322b758ce8/lib/cocoa.rb:27:inblock (3 levels) in <top (required)>'

rake aborted!
NoMethodError: undefined method `start_with?' for #<Array:0x007ffb81278c40>
/.rvm/gems/ruby-2.0.0-p481/bundler/gems/Flow-70322b758ce8/lib/cocoa.rb:27:in `block (3 levels) in <top (required)>'
@lrz
Copy link
Member

lrz commented Feb 4, 2016

I'm curious, how did you manage to have an Array inside app.files? Could you print the value of app.files in lib/cocoa.rb before the delete_if loop so that we can see what's inside?

@marlabz6
Copy link
Author

marlabz6 commented Feb 5, 2016

I have 2 rather large arrays:
[["/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/cdq.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/managed_object.rb"], ["/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/cdq/collection_proxy.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/cdq/config.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/cdq/context.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/cdq/deprecation.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/cdq/model.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/cdq/object.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/cdq/object_proxy.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/cdq/partial_predicate.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/cdq/query.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/cdq/relationship_query.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/cdq/store.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/cdq-1.0.8/lib/../motion/cdq/targeted_query.rb"], ["/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/RedAlert-1.4/lib/project/action_sheet_provider.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/RedAlert-1.4/lib/project/alert_action.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/RedAlert-1.4/lib/project/alert_constants.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/RedAlert-1.4/lib/project/alert_controller_provider.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/RedAlert-1.4/lib/project/alert_field.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/RedAlert-1.4/lib/project/alert_view_provider.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/RedAlert-1.4/lib/project/button_templates.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/RedAlert-1.4/lib/project/field_templates.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/RedAlert-1.4/lib/project/ios9_fix_uialertcontroller.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/RedAlert-1.4/lib/project/red_alert.rb"], ["/Users/mbonar/.rvm/gems/..."./app/stylesheets/video_controls_stylesheet.rb", "./app/stylesheets/video_screen_stylesheet.rb", "./app/views/transparent_modal.rb", "./app/views/video_controls.rb", "/Users/mbonar/.rvm/gems/ruby-2.0.0-p481/gems/motion-yaml-1.4/lib/project/yaml.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/net/actions.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/net/authorization.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/net/config.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/net/expectation.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/net/header.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/net/net.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/net/response.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/net/session.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/net/stubbable.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/net/cocoa/reachability.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/net/cocoa/request.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/net/cocoa/response_proxy.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/json/cocoa/json.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/digest/cocoa/digest.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/store/cocoa/store.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/base64/cocoa/base64.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/location/location.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/location/cocoa/location_services.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/task/task.rb", "/Users/mbonar/dev/rubymotion/Flow/lib/../flow/task/cocoa/task.rb"]
then the above repeats one more time

  From: Laurent Sansonetti <[email protected]>

To: HipByte/Flow [email protected]
Cc: marlabz6 [email protected]
Sent: Thursday, February 4, 2016 11:58 AM
Subject: Re: [Flow] Fixing build error (#6)

I'm curious, how did you manage to have an Array inside app.files? Could you print the value of app.files in lib/cocoa.rb before the delete_if loop so that we can see what's inside?—
Reply to this email directly or view it on GitHub.

@allieus
Copy link

allieus commented Aug 11, 2016

I get the same error occurs.

I do not know why that create a redundant array.

I'm monkey-patching !

lib/cocoa.rb

  app.files.flatten!

  samples = %w(android ios osx).delete_if {|t| t == template}
  samples.each do |sample|
    app.files.delete_if { |path| path.start_with?("./app/#{sample}") }
  end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants