May27

Ketika tulisan ini dibuat mobile-8 belum juga menyediakan driver modem CDMA Pantech untuk Sistem Operasi Mac OSX, namun barusan saya berhasil membuat Mac saya terkoneksi ke internet pake Fren Mobi

Sebetulnya, awalnya saya iseng, googling sana sini, dan menemukan Driver Pantech untuk Mac yang digunakan oleh Verizon Wireless, setelah ngoprek sedikit, eh nggak nyangka koq tau2 bisa, bahkan Access Manager yang disediakan Verizon ini lebih bagus daripada Access Manager yg bawaan Fren Mobi, karena dia bisa mendeteksi no kartu dan username secara otomatis, so langsung saja begini caranya

  • Masuk ke http://www.vzam.net/download/download.aspx?productid=556
  • Setelah itu akan ada pilihan radio button, pilih salah satu
  • Lalu Verizon akan menanyakan no HP anda, pilih saja sembarang nomor
  • Lalu tekan continue dan tekan tombol download now, maka browser akan mulai men-download
  • Setelah itu install file dmg tsb, setelah selesai lalu restart Mac anda
  • Setelah Mac anda start, VZ Access Manager akan memberi beberapa pertanyaan, ikuti sesuai langkah yang ada di buku manual Fren Mobi anda
  • Nah jika VZAccess Manager telah terbuka anda langsung saja pilih networks –> Verizon Wireless VZAccess, lalu tekan tombol connect WWAN (di sinilah hebatnya, tidak perlu lagi Add Network dan konfigurasi username & password)
  • Nah selesai deh, seharusnya saat ini Mac anda telah terkoneksi dengan internet melalui Fren Mobi

Oiya kelemahan VZAccess ini, kita tidak bisa mengecek berapa banyak quota bandwidth yang telah kita habiskan, karena memang VZAccess sepertinya tidak menyediakan fitur TXT untuk mengirim SMS ke nomor Fren Mobi, kalau ingin mengecek quota anda, terpaksa harus switch ke windows :D

May07

We all know, Action Web Service (aws) no longer included in Rails 2, this makes me little bit frustation to integrate latest aws (1.2.6) to rails 2, that gems always make rails broken and raise error like this when we start the server

/usr/lib/ruby/gems/1.8/rubygems.rb:142:in `activate’: can’t activate actionpack (= 1.13.6, runtime), already activated actionpack-2.2.2 (Gem::Exception)

However, how fortunate me, Achmad Gozali, friend of mine in id-ruby suggested to used this modified aws in github and finally after i tried, my installation was succeed, so here the step

add github to your gem sources

gem sources -a http://gems.github.com/

install datanoise-actionwebservice gems, i use rails 2.2.2, so i should install datanoise-actionwebservice version 2.2.2 as well

gem install datanoise-actionwebservice -v=’2.2.2′

add this line to your config/environtment.rb (inside “Rails::Initializer.run do |config|” block)

config.gem ‘datanoise-actionwebservice’, :lib => ‘actionwebservice’, :version => ‘2.2.2′

try to start your web server, if it isn’t broken, that means your gems was successfully installed

ruby script/start

also you can make the basic code through generation

[aditya@aditya trunk]$ ruby script/generate web_service blabla
exists app/services/
exists app/controllers/
exists test/functional/
create app/services/blabla_api.rb
create app/controllers/blabla_controller.rb
create test/functional/blabla_api_test.rb

credit : thanks to Datanoise guys out there and Achmad Gozali of id-ruby to make this happen

May01

Skenarionya begini, katakanlah kita mempunyai 3 tabel, sellers, products dan orders, relasi antar tabelnya di definisikan di setiap model sebagai berikut :

file : app/models/seller.rb
	
class Seller < ActiveRecord::Base
  has_many :products
end
	
file : app/models/product.rb
	
class Product < ActiveRecord::Base
   belongs_to :seller
   has_many :orders
end
	
file : app/models/order.rb
	
class Order < ActiveRecord::Base
   belongs_to :product
end

nah suatu saat, kita ingin menampilkan data-data pesanan beserta nama penjualnya, di controller kita definisikan seperti ini :

Klik di sini kalau masih penasaran …