Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NameError: uninitialized constant YAML #105

Open
bmichotte opened this issue Jun 23, 2015 · 11 comments
Open

NameError: uninitialized constant YAML #105

bmichotte opened this issue Jun 23, 2015 · 11 comments

Comments

@bmichotte
Copy link

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

@MOPineyro
Copy link

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)

@markrickert
Copy link
Member

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 :-/

@kemiller
Copy link
Contributor

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

@markrickert
Copy link
Member

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.

@kemiller
Copy link
Contributor

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

@kemiller
Copy link
Contributor

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.

@markrickert
Copy link
Member

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: infinitered/redpotion#130

@markrickert
Copy link
Member

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?

@bmichotte
Copy link
Author

@markrickert fix also correct my issue

@markrickert
Copy link
Member

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...

@twerth
Copy link
Member

twerth commented Jul 14, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants