motion-bundler | Use Ruby gems and mock require statements within RubyMotion | Data Migration library
kandi X-RAY | motion-bundler Summary
kandi X-RAY | motion-bundler Summary
RubyMotion has united two great programming communities: the Ruby and iOS community. We are no longer forced to develop native iOS applications (for iPhone and iPad) using Objective-C and XCode anymore because we can choose using Ruby with any kind of text editor. Ruby gives us a lot of benefits like the beauty and flexibility of the language. Also, the Ruby community is driven by its enormous amount of open source libraries which are packed as so called "Ruby gems". Bundler is the Ruby standard for managing all the gem dependencies used within a Ruby project. There are limitations though as you cannot use any random Ruby gem you want to. It either has to be RubyMotion aware (like BubbleWrap) or RubyMotion compatible (mostly when having as minimal gem dependencies as possible and not doing fancy Ruby stuff like code evaluation). Also, you cannot just require Ruby sources at runtime. You will have to specify them along with their mutual dependencies. This can give us a lot of headaches and so I have created a Ruby gem called MotionBundler. It will unobtrusively track and specify the required Ruby sources and their mutual dependencies of Ruby gems you want to use in your RubyMotion application.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Determines the code for the given range .
- Initiate the binary format .
- Extracts a list of match codes .
- Strip the block .
- Tracks the given file
- Write the output to the output buffer
- Registers the files that are registered to be loaded .
- Add a require to the list of dependencies .
- Raise the command .
motion-bundler Key Features
motion-bundler Examples and Code Snippets
Community Discussions
Trending Discussions on motion-bundler
QUESTION
I'm trying to use kindle-highlights gem in RubyMotion. I found motion-bundler, that should help me bring these two together.
According to FAQ from motion-bundler, not every gem will work.
Can I use every random Ruby gem available?
Unfortunately, no. You can only use Ruby gems which do not require libraries (e.g. psych.bundle) and do not use string evaluation at runtime (for instance using class_eval with a String).
If I'm trying to use kindle-higlights I get the uninitialized constant
error:
(main)> 2017-02-14 10:13:41.606 HelloMotion[60710:1987881] app_delegate.rb:26:in `application:didFinishLaunchingWithOptions:': uninitialized constant AppDelegate::KindleHighlights (NameError)
2017-02-14 10:13:41.610 HelloMotion[60710:1987881] *** Terminating app due to uncaught exception 'NameError', reason: 'app_delegate.rb:26:in `application:didFinishLaunchingWithOptions:': uninitialized constant AppDelegate::KindleHighlights (NameError)
So what i want to know is:
- Can I use this gem?
- Is this the error I should expect, if it is not meant to be?
- Does "do not require libraries" mean, any library or just some, that kindle-highlights is using?
- Any suggestions on how to proceed?
ANSWER
Answered 2017-Feb-16 at 00:49Couple of things:
- Only gems that support Ruby 1.9 will work RubyMotion does not support newer versions of Ruby.
- Gems that require a C-extension or depend on a Gem that requires a C-extension will not work
- Gems with eval will not work
motion-bundler is still a useful library and should help but the gem you want says it required Ruby 2.1.0, so I don't think it will work. If you want to try to make a gem RubyMotion compatible (without motion-bundler) you can try following this tutorial http://blog.motioninmotion.tv/gems-for-ruby-or-rubymotion/
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install motion-bundler
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page