[MacRuby-devel] macruby_deploy error while compiling files

Eloy Duran eloy at dekleineprins.me
Thu May 5 05:34:37 PDT 2011


No, that's not right. The embed code is run before the compile code
and the compile code uses the following to select all ruby files in
the Resources directory of the app bundle:

  def compile_files
    Dir.glob(File.join(app_resources, '**', '*.rb'))
  end

It would be great if you can upload a sample that shows this.

On Thu, May 5, 2011 at 2:11 PM, Petr Kaleta <petr.kaleta at me.com> wrote:
> Now I am looking in the application package and embeded gems are not compiled. And as you can see here http://cl.ly/240t0v3q2O221X3U113u some ruby files compiled are, but there are source files as well. Embeded STDlib is not compiled at all http://cl.ly/2d2D2R2L451m2C2x472J
>
> Is this right?
>
> On May 5, 2011, at 1:27 PM, Petr Kaleta wrote:
>
>> Thanks for reply, that works. So after deploying, my whole application has about 45MB (zipped 12MB). My only question is, can I somehow speedup application start? Now it takes about 10 seconds (loading gems & project files).
>>
>> - Petr
>>
>> On May 5, 2011, at 12:13 PM, Eloy Duran wrote:
>>
>>> No it's not your fault, it seems the code assumes a ENV variable
>>> that's set by Xcode. This is the offending code:
>>>
>>>       compile_options = { bundle: true, output: obj, files: [source] }
>>>       # Use Xcode ARCHS env var to determine which archs to compile for
>>>       compile_options[:archs] = ENV['ARCHS'].strip.split if ENV['ARCHS']
>>>       # Check that the ARCHS env var contains valid values
>>>       supported_archs = RbConfig::CONFIG['ARCH_FLAG'].gsub('-arch',
>>> '').strip.split
>>>       compile_options[:archs].delete_if do |arch|
>>>         unless supported_archs.include?(arch)
>>>           puts "Can't build for arch #{arch} because it is not supported"
>>>           true
>>>         end
>>>       end
>>>
>>> I think that if the ENV['ARCHS'] variable isn't set we should check
>>> the app binary for the archs it's been built for. I'll create a path
>>> in a bit.
>>>
>>> For now you should be able to work around it by doing:
>>>
>>> env ARCHS='i386 x86_64' macruby_deploy --compile --embed --gem
>>> rest-client --gem sequel --bs Issues.app
>>>
>>> And adjust the actual archs for the ones your app is built for.
>>>
>>> On Thu, May 5, 2011 at 11:57 AM, Petr Kaleta <petr.kaleta at me.com> wrote:
>>>> Hi everyone, I'd like to deploy my Macruby app using:
>>>>
>>>> macruby_deploy --compile --embed --gem rest-client --gem sequel --bs Issues.app
>>>>
>>>> but I'm getting this error:
>>>>
>>>> *** Deployment started
>>>> *** Embedding MacRuby.framework
>>>> *** Embed RubyGems libdirs: /Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/Gems/1.9.2/gems/mime-types-1.16/lib, /Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/Gems/1.9.2/gems/rest-client-1.6.1/lib, /Library/Frameworks/MacRuby.framework/Versions/0.11/usr/lib/ruby/Gems/1.9.2/gems/sequel-3.22.0/lib
>>>> *** Embed BridgeSupport system files
>>>> *** Fix install path of binaries
>>>> *** Fix identification name of libmacruby
>>>> *** Compiling files
>>>> /usr/local/bin/macruby_deploy:127:in `block': undefined method `delete_if' for nil:NilClass (NoMethodError)
>>>>       from /usr/local/bin/macruby_deploy:117:in `compile'
>>>>       from /usr/local/bin/macruby_deploy:70:in `run'
>>>>       from /usr/local/bin/macruby_deploy:283:in `<main>'
>>>>
>>>> Am I doing something wrong, or this is some bug in macruby_deploy tool? I am using the latest macruby version from origin/master.
>>>>
>>>> - Petr
>>>> _______________________________________________
>>>> MacRuby-devel mailing list
>>>> MacRuby-devel at lists.macosforge.org
>>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>>>
>>> _______________________________________________
>>> MacRuby-devel mailing list
>>> MacRuby-devel at lists.macosforge.org
>>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>>
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>


More information about the MacRuby-devel mailing list