This text is replaced by the Flash movie.

Archive for the ‘Coding/Programming’ Category

Annotate Ruby on Rails

February 11th, 2012
I want to try this annotate on rails which put lists of datafield to your build model, I'm trying this with windows 7, and produced a lot of bugs, number 1 error - the "annotate" gem, without version number I installed didn't work well, I learned that installing gem annotate need to have version number for the Ruby/Rails version I have, annotate 2.4.1.beta worked fine. Next after I run bundle install for the new gem needed and run annotate on command console, it popout an error

'const_missing': uninitialized constant Rake::DSL (NameError)


Error Annotate

After searching the net for solutions I found out that the new command for this annotate version with my current version of gems and ruby is just to run "bundle install annotate", and I checked the model and annotation worked.
Annotate Worked

Version I'm Running
-Ruby 1.9.2
-Gem Annotate 2.4.1.beta
-Rail 3.1.0
-Rake 0.9.2.2


Final Gemfile Setup for Development
1
2
3
4
5
6
7
8
group :development do
   # gem 'annotate_models' -> this is fucking gonner
   # gem 'annotate' -> don't work
   # run in command bundle exec annotate
   gem 'annotate', '~> 2.4.1.beta' #for the error occuring a beta patch
   gem 'webrat' #important with rspec -> Rspec - undefined method `has_selector?' 
   gem 'rspec-rails'
end

Two Versions Cake Console

January 13th, 2012
Cake 2.0 was recently release, but I don't want to migrate yet some applications I already build with this version (afraid there are so many changes) most of my work are under 1.3, so I just decided to study it first. To have 2 cake console what I did is just to add another path in environment variables, Cake 2.0 console path is at cakephp/app/console and just rename cake.bat to cake2.bat, now I can use 2 cake versions within my current PC system. 

Cake Console 2.0

keytool and Android Maps

May 20th, 2011
Using Maps on Android is quite hard to implement compare to Apple's iPhone and xcode development, it's really weird that Google have to make these troubles for their Android developers. You have to generate API key before you can use the map or else you are just gonna see tiles.

Map With iPhone Xcode(Objective-C) is simple to implement.
Android Maps

Map With Android Eclipse(Java) Not following instructions from Google Site will just show tiles.
Android Maps

Before you can generate API key for your android applications with map in it. You have to go http://code.google.com/android/maps-api-signup.html and follow the steps, on windows I found out that the keytool is not recognized. keytool is one of Java tools,

Android Map

so the simple fix was just I browse down to my Java bin folder L:\Program Files\Java\jre1.6.0_07\bin and check if I have it there, then add it on the Environment Variables PATH, to make it easy for you to call this executable file while you are in the current folder of debug.keystore.

Android Map

So After Obtaining API Key I finally can see the Map on Emulator powered by Google Apis.
Android Maps Android Maps

PhoneGap Copy Javascript Error

May 16th, 2011
I'm trying something new right now, web apps on smartphones, while trying to shell a simple html I did, (just displaying a JS alert box) I got this error that phoneGap can't transfer something.

PhoneGap JS Debug

The simple fixed was just rename the folder that has space on it going to your xcode project.

PhoneGap JS Test

ZendFramework Library

March 1st, 2011
if somehow you encounter this kind of error(mostly this will be encounter by first timers using ZendFramework)

Warning: require_once(Zend/Application.php) [function.require-once]: failed to open stream: No such file or directory...
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Application.php'....


Zend Framework Library you can either include the path library(where you installed Zend Framework your client path) in your php.ini, or manually copy the zend library under your application library folder.

for php.ini settings
include_path = ".:/Applications/MAMP/bin/php5/lib/php:/usr/local/ZendFrameworkCli/library"


where /usr/local/ZendFrameworkCli is the path I installed my ZendFramework .../library is where the zend libraries are located.