cdq icon indicating copy to clipboard operation
cdq copied to clipboard

NameError: uninitialized constant YAML

Open bmichotte opened this issue 9 years ago • 11 comments

Hi,

not totally sure if it's a cdq issue... but well...

after an update to cdq 1.0.3, I receive this error

benjamin@MacBookAir:~/workspace/hstracker
> bundle update                                                 
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.4.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.7.0
Using thread_safe 0.3.5
Using tzinfo 1.2.2
Installing activesupport 4.2.2 (was 3.2.21)
Using builder 3.2.2
Using motion-yaml 1.4
Using plist 3.1.0
Installing ruby-xcdm 0.0.9 (was 0.0.8)
Installing cdq 1.0.3 (was 1.0.2)
Using claide 0.8.1
Using fuzzy_match 2.0.4
Using nap 0.8.0
Using cocoapods-core 0.37.2
Using cocoapods-downloader 0.9.0
Using cocoapods-plugins 0.4.2
Using netrc 0.7.8
Using cocoapods-trunk 0.6.1
Using cocoapods-try 0.4.5
Using colored 1.2
Using escape 0.0.4
Using molinillo 0.2.3
Using xcodeproj 0.24.2
Using cocoapods 0.37.2
Using dbt 1.1.5
Using motion-cocoapods 1.7.1
Using motion-kit 0.17.0
Using motion-kit-events 0.3.1
Using motion-logger 0.1.3
Using motion_print 1.1.2
Using sugarcube 3.3.5
Using bundler 1.10.0.rc
Bundle updated!
benjamin@MacBookAir:~/workspace/hstracker (*) (!)
> rake pod:update                                                        
rake aborted!
NameError: uninitialized constant YAML
/Library/RubyMotion/lib/motion/project/config.rb:117:in `call'
/Library/RubyMotion/lib/motion/project/config.rb:117:in `block in setup'
/Library/RubyMotion/lib/motion/project/config.rb:117:in `each'
/Library/RubyMotion/lib/motion/project/config.rb:117:in `setup'
/Library/RubyMotion/lib/motion/project/app.rb:66:in `config'
/Library/RubyMotion/lib/motion/project/app.rb:74:in `setup'
/Users/benjamin/Documents/workspace/hstracker/Rakefile:7:in `<top (required)>'
(See full trace by running task with --trace)

The error is not due to pod:update, any rake call abort

bmichotte avatar Jun 23 '15 18:06 bmichotte

Receiving similar error after updating cdq to 1.0.4

<Warning>: yaml.rb:28:in `load:': wrong number of arguments (-1685773368 for 0) (ArgumentError)
<Warning>: yaml.rb:28:in `load:': wrong number of arguments (-1685773368 for 0) (ArgumentError)
<Error>: *** Terminating app due to uncaught exception 'ArgumentError', reason: 'yaml.rb:28:in `load:': wrong number of arguments (-1685773368 for 0) (ArgumentError)

MOPineyro avatar Jul 10 '15 03:07 MOPineyro

I'm getting this error as well, @kemiller - but only on the evice... simulator works fine for some odd reason.

Jul 13 15:47:46 Marks-iPhone App Dev[1183] <Warning>: yaml.rb:28:in `load:': wrong number of arguments (-1737608248 for 0) (ArgumentError)
Jul 13 15:47:46 Marks-iPhone App Dev[1183] <Warning>: yaml.rb:28:in `load:': wrong number of arguments (-1737608248 for 0) (ArgumentError)
Jul 13 15:47:46 Marks-iPhone App Dev[1183] <Error>: *** Terminating app due to uncaught exception 'ArgumentError', reason: 'yaml.rb:28:in `load:': wrong number of arguments (-1737608248 for 0) (ArgumentError)

I've tried downgrading and running all the way down to 1.0.2 and still get the same error. I can't deploy to a client's device until this is fixed :-/

markrickert avatar Jul 13 '15 13:07 markrickert

It's a really bizarre error. How can anyone be passing negative arguments to a method?

kemiller avatar Jul 13 '15 14:07 kemiller

No idea... and it's strange that it's only happening on the device. I'm locked at RM 3.12 but i'll try and use the most recent version to see if it still happens.

markrickert avatar Jul 13 '15 14:07 markrickert

yeah, makes me wonder if there's an RM bug

kemiller avatar Jul 13 '15 14:07 kemiller

The method in question that's unhappy with its argument count is an Objective C method, and it's loaded from a precompiled .a file. Two versions, one for OS X and one for iOS, which would partly explain the difference you're seeing between sim and device.

kemiller avatar Jul 13 '15 14:07 kemiller

Updating to the latest RM and using CDQ from github/master i get:

Jul 13 16:19:55 Marks-iPhone App Dev[1231] <Warning>: config.rb:38:in `block in initialize:': uninitialized constant CDQ::CDQConfig::YAML (NameError)
Jul 13 16:19:55 Marks-iPhone App Dev[1231] <Error>: *** Terminating app due to uncaught exception 'NameError', reason: 'config.rb:38:in `block in initialize:': uninitialized constant CDQ::CDQConfig::YAML (NameError)

Reverting back to RM 3.12 and doing a rake clean && rake device results in the same error.

Reverting to 1.0.4 and even lower I get the error referenced here: https://github.com/infinitered/redpotion/issues/130

markrickert avatar Jul 13 '15 14:07 markrickert

Fixed: Add this to your gemfile:

gem "cdq", "1.0.6"
gem "motion-yaml", "1.4"

Seems as thought motion-yaml had some updates that have broken CDQ.

Maybe we should hardcode this into the gemsec?

markrickert avatar Jul 13 '15 14:07 markrickert

@markrickert fix also correct my issue

bmichotte avatar Jul 13 '15 14:07 bmichotte

Sweet. Now to figure out what motion-yaml changed between then and now so we don't have to rely on an old version in CDQ...

markrickert avatar Jul 13 '15 14:07 markrickert

In RedPotion, I set this int he template's gemfile.

twerth avatar Jul 14 '15 03:07 twerth