rubymotion-community / sugarcube

Some sugar for your cocoa. RubyMotion helpers.
Other
422 stars 66 forks source link

undefined method `uicolor', undefined method `uiimage' #95

Closed rsignavong closed 11 years ago

rsignavong commented 11 years ago

Hello,

it seems sugarcube is not working anymore on my app.

I use uicolor method and uiimage method everywhere for setting color and image.

It worked perfectly last month, but now I got this error :

undefined method uicolor' for [...]:Array (NoMethodError) or application:didFinishLaunchingWithOptions:': undefined method `uiimage' for "splash1.png":String (NoMethodError)

ruby 1.9.3p448 (tried with ruby-2.0.0-p247 but still the same issue) Xcode 4.6.3 (latest from AppStore) rubymotion 2.6

gem list [...] sugarcube (1.0.6) xcodeproj (0.9.0)

Does anyone having the same issue ? or any idea of this ?

Any help would be really appreciated, thanks!

Kinny

colinta commented 11 years ago

Did you go through the upgrade steps? 1.0 introduced lots of smaller packages, to make it more opt-in.

rsignavong commented 11 years ago

No, I didn't know they were the upgrade steps. I just add gem 'sugarcube' in my Gemfile and then bundle install it.

How do you do upgrade steps ?

katsuyoshi commented 11 years ago

You should write this line in your Gemfile. gem 'sugarcube', :require => 'sugarcube-classic' And execute bundle install

https://github.com/rubymotion/sugarcube#installation

rsignavong commented 11 years ago

I fixed my problem, everything works fine now!

As you said, I needed to add upgrade steps Gemfile gem 'sugarcube', :require => 'sugarcube-classic'

Rakefile require 'sugarcube' require 'sugarcube-color' require 'sugarcube-image'

and when rake it add some more compilation and no more error.

Thanks!