jamonholmgren / ProMotion

ProMotion is a RubyMotion gem that makes iPhone development less like Objective-C and more like Ruby.
MIT License
1.26k stars 147 forks source link

Formotion Issue #366

Closed altruus closed 10 years ago

altruus commented 10 years ago

I just ran bundle update, which updated promotion to 1.1.0.

I am now getting this error on rake

Terminating app due to uncaught exception 'ArgumentError', reason: 'uncaught throw "Unable to find Formotion" (ArgumentError)

I have tried using formotion both ways ('formotion','ProMotion-formotion') and get the same issue now matter what.

Was working great until I updated promotion

silasjmatson commented 10 years ago

This is an issue with Promotion-formotion, that I believe was resolved here.

You may want to comment on that thread if you're still having issues.

silasjmatson commented 10 years ago

Also, I think you need app.detect_dependencies = false in your Rakefile.

altruus commented 10 years ago

made both of those changes and now getting

Terminating app due to uncaught exception 'NameError', reason: 'uninitialized constant ProMotion::TableViewCell::TableViewCellModule (NameError)
jamonholmgren commented 10 years ago

Actually, it's app.detect_dependencies = true on 1.1.0, false or unset on edge and beyond.

Regarding your original question, you may want to update to use the GitHub edge branch and remove detect_dependencies and use ProMotion-formotion. This combination should work. 1.1.0 is kind of in a transition period for Formotion (the last release to include built-in PM::FormotionScreen) so support is a little flakey.

EDIT: master has that feature as well, so updating for that.

EDIT 2: `master does not have that feature. My bad.

jamonholmgren commented 10 years ago

To update to master:

gem "ProMotion", github: "clearsightstudio/ProMotion", branch: "master"
markrickert commented 10 years ago

heh... i was just going to paste that :)

jamonholmgren commented 10 years ago

Lunchtime = ProMotion issue answering!

jamonholmgren commented 10 years ago

Let us know if it works or not, @altruus . I'll close for now but feel free to re-open.

altruus commented 10 years ago

I just reverted back to the old version for now to get it working again. I will try this later.

Appreciate the help.

fuelxc commented 10 years ago

I can't get this to work: Gemfile:

gem "ProMotion", github: "clearsightstudio/ProMotion", branch: "master"
gem 'ProMotion-formotion'
gem "bubble-wrap"
gem "sugarcube"

Rakefile:

# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/ios'
require "rubygems"
require 'bundler'
Bundler.require
require 'sugarcube-color'
require 'bubble-wrap/http'
require 'motion-require'
Motion::Require.all

Motion::Project::App.setup do |app|
  # Use `rake config' to see complete project settings.
  app.detect_dependencies = false
  app.name = 'ff'
end

rake output:

Terminating app due to uncaught exception 'NameError', reason: 'uninitialized constant ProMotion::TableViewCell::TableViewCellModule (NameError)
jamonholmgren commented 10 years ago

@fuelxc , sorry about that, my bad. Switch to using edge. master does not actually have detect_dependencies = false support.

GantMan commented 10 years ago

@jamonholmgren I find myself in this same problem. I've done everything mentioned above.

I've flipped all the switched, and jumped through the hoops, but it just bombs out.

Unfortunately I started writing around features of ProMotion 1.1 so I'm unable to back out of the upgrade like altruus did.

I've got code if you want, but it looks to me that simply including the gem is causing the error.

asecondwill commented 10 years ago

same here.

gem file:

source "https://rubygems.org"

gem "ProMotion", github: "clearsightstudio/ProMotion", branch: "edge"
gem "teacup" # advanced styling
#gem "bubble-wrap" # lots of goodies
gem 'sugarcube', :require => 'sugarcube-common'
#gem "rmq" # jQuery for RubyMotion
gem "motion-pixate" # css
gem 'motion-takeoff'
gem "ProMotion-formotion"

rakefile

# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/ios'
require "rubygems"
require 'bundler'
require 'motion-pixate'
require 'motion-require'
Bundler.require

Motion::Require.all

Motion::Project::App.setup do |app|
  app.detect_dependencies = false
  app.fonts = ['century-webfont.ttf']
   ....
end

error: can't convert Array into String

removing the motion-require and detect_dependencies lines gets a "uninitialized constant FormotionScreen" error

jamonholmgren commented 10 years ago

Okay, thanks for the reports guys. This one is going to top priority for me.

jamonholmgren commented 10 years ago

Pushed up a debugging app here: https://github.com/jamonholmgren/pm_issue_366

jamonholmgren commented 10 years ago

Okay, guys, got it fixed. View the source at the link above or follow these steps. Note that this is for PM 1.1.x and below only. PM edge and 2.0.x+ will have a different solution since it uses motion-require.

Clean your build

rake clean

Gemfile

gem "rake"
gem "ProMotion", "~> 1.1.1"
gem "formotion"
# Do NOT include ProMotion-formotion
# ...

Rakefile

# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/ios'
require "rubygems"
require 'bundler'
Bundler.require

Motion::Project::App.setup do |app|
  # Use `rake config' to see complete project settings.
  app.name = 'pm_issue_366'
  app.detect_dependencies = true
end

It should now work. If not, please respond here!

jamonholmgren commented 10 years ago

I'm also pushing up an edge branch to that repo, demonstrating working with the PM edge branch and ProMotion-formotion.

jamonholmgren commented 10 years ago

That works too. Updated the README. I'm going to close this issue; feel free to re-open if you're still having problems!

GantMan commented 10 years ago

:star2: Works perfect!

asecondwill commented 10 years ago

Awesome. Thanks very much. : )