Skip to content

Conversation

@darinwilson
Copy link
Contributor

I was trying to integrate the motion_print gem into an Android app and got this error during the build:

rake aborted!
TypeError: no implicit conversion of Array into String
/Library/RubyMotion/lib/motion/project/template/android.rb:156:in `expand_path'
/Library/RubyMotion/lib/motion/project/template/android.rb:156:in `block (2 levels) in <top (required)>'
/Library/RubyMotion/lib/motion/project/template/android.rb:155:in `each'
/Library/RubyMotion/lib/motion/project/template/android.rb:155:in `block in <top (required)>'
Tasks: TOP => device => build

It looks like motion_print is exposing its file paths as an Array, and that doesn't get correctly flattened with the other file paths in the RubyMotion Android template. Since motion_print works fine in iOS, I'm assuming that this is a bug on the Android side.

Calling flatten on App.config.files does the trick, though I'm not sure if that's the best overall solution.

Here's a sample repo that illustrates the problem (along with a couple of other issues that I'll file as separate support requests): https://github.com/darinwilson/rma-testing/tree/master/gem_integration

@darinwilson darinwilson changed the title Make sure all Ruby file paths are flattened into single Array [Android] Make sure all Ruby file paths are flattened into single Array Jan 22, 2015
Conflicts:
	lib/motion/project/template/android.rb
@GantMan
Copy link
Member

GantMan commented Apr 4, 2015

Great call! motion_print is a great gem and should be supported 👍

GantMan added a commit that referenced this pull request Apr 4, 2015
[Android] Make sure all Ruby file paths are flattened into single Array
@GantMan GantMan merged commit 72cb890 into HipByte:master Apr 4, 2015
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.

2 participants