HipByte/RubyMotion — pull request #22 by dmarkow (2012-07-12 21:47:34+00:00)
Title: Bundler/Gemfile errors

On 1.16 (untested on previous versions): If the user has the Bundler gem installed, but no Gemfile in their project, then an unhanded NoMethodError is thrown when doing `Bundle.require`

On a fresh project under 1.16 (using `motion create foo`):

Without Bundler installed:

$ rake -T
# Works!

With Bundler installed, and a Gemfile in the project:

$ rake -T
# Works!

With Bundler installed, but no Gemfile:

$ rake -T --trace

rake aborted!
private method `require' called for Bundler:Module
/Library/RubyMotion/lib/motion/project.rb:44:in `'
/usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p194-perf/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/usr/local/Cellar/rbenv/0.3.0/versions/1.9.3-p194-perf/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
/Users/dylan/foo/Rakefile:3:in `'

This pull request simply catches the `NoMethodError` and moves on, continuing to run without Bundler.