Wednesday, June 3, 2009

step by step install ruby + apache + ubuntu server

1.sudo apt-get update
2.sudo apt-get dist-upgrade
3.sudo apt-get install build-essential
4.sudo apt-get install ruby ri rdoc mysql-server libmysql-ruby ruby1.8-dev irb1.8 libdbd-mysql-perl libdbi-perl libmysql-ruby1.8 libmysqlclient15off libnet-daemon-perl libplrpc-perl libreadline-ruby1.8 libruby1.8 mysql-client-5.0 mysql-common mysql-server-5.0 rdoc1.8 ri1.8 ruby1.8
5.sudo wget http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz
6.tar xvzf rubygems-0.9.4.tgz
7.cd rubygems-0.9.4
8.sudo ruby setup.rb
9.sudo ln -s /usr/bin/gem1.8 /usr/bin/gem

just in case it went wrong somewhere like u received an error saying
- /usr/bin/gem:10:Warning: Gem::manage_gems is deprecated and will be removed on or after March
2009. OR/AND
- /usr/bin/gem:23: uninitialized constant Gem::GemRunner (NameError)

simply sudo aptitude remove rubygems or ruby and start all over.

10. sudo gem install rails --include-dependencies
11. if later version of rails required simply type
sudo gem install rails -v=1.2.6
12. for installing phusion passeger go to http://www.modrails.com/install.html. its really quick n easy too

Saturday, May 30, 2009

broadband on celcom3g

heya...its been a while.but just before this i tried to create a new blogspot.luckily i was too lazy to create another gmail accout...so i tried to create a new one using my current gmail accout.and i was directed to here....hehe

so last week i ( together with ina) went to buy ourself a mobile broadband.we chose celcom of course.luckily mines ada one celcom dearler.it cost me RM 393 ( celcom postpaid + modem ).kira okla kan...mobility sake.

then only after almost 2 days, i realized im using ubuntu.it took like 24-48 hours for the sim to be activated.JIT.so i spose huawei dont have the plug and play feature for ubuntu or for any other linux distribution.

at first attempt, i was googling at all the wrong places.then i got it the config for celcom3g huawei.
open your terminal and got to /etc/wvdial.conf and put this there

[Dialer celcom3g]

Phone = *99***1#
Modem = /dev/ttyUSB0
Username = user
Password = pass
ISDN = 0
New PPPD = yes
Baud = 1843200
Init2 = ATZ
Init3 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem

save and close the editor

whenever u wish to connect to ur broadband, simply type

sudo wvdial celcom3g

you are connected when the u see your ip is given on the console.and you may start surfing!

and to disconnect to the broadband, just ctrl-C...and ure free to go...

Now i can surf anywhere...balik kampong? no hal punya...anytime....ahhaah

Wednesday, December 17, 2008

Tuesday, December 16, 2008

aiyak!

so many time wasted la installing this thing...
need to bare in mind, if ure running in something new...always get the latest version...ts

so now im uninstalling rubygems 1.2.0 te outdated one with the latest version which is 1.3.
how do you get the latest version...?
im a ubuntu/linux newbie myself, so im sure there r a lot of other ways to get this rubygems installed on your system.

as for me, i went direct to its download homepage and copy the link of its latest release.

then, paste it on your terminal, using the wget command.and Alhamdulilllah, rubygems is finally updated.

Monday, December 15, 2008

MYSQL server

to install mysql on ubuntu, all u need is , type this command onto your terminal

sudo apt-get install mysql-server

when it is done, u can either create and manage your database thru command line as MY SQL is a command line based application. OR...jeng jeng jeng... use can install an GUI application that can manage your MySQL.
For windows : Mysqlyog, MYSqlControl center,..,...
for ubuntu : mysql-admin,mysql-navigator, mysql-query-browser


Currently im using mysql-admin.
u can get this by command line

sudo apt-get install mysql-admin

or open your System > Administration > Synaptoc Package Manager
Search for mysql-admin and click apply. it will install it for you.
so i wanna code in ruby.
when i first tried to installed ruby & RoR, i installed on windows.
macam2 hal.altho it says ruby is cross platform, still it doesnt support everything.
like for example mysql dont go well with rubygems and so on.
a sifu told me that if u wanna stick with windows, it is better to use sqlite3. but sqlite3 is not good for live production. mysql is. so what u need to do is, continue use sqlite3. but on the server, install mysql and use an adapter and set it as sqlite3.

but then i converted to ubuntu as vista drove me nuts with all the credentials and slowness and so on.
so heres how i install ruby and ruby on rails on ubuntu.

first and foremost, open a terminal...and start installing...

wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
tar xzvf rubygems-1.2.0.tgz
cd rubygems-1.2.0
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
sudo gem update --system


refer link

Wednesday, December 10, 2008

reinstalling rubygemssssss

my rubygems went wrong somehow. i kept getting this error..

/usr/bin/gem:10:Warning: Gem::manage_gems is deprecated and will be removed on or after March 2009.

then , i found this article disscussing the same error , i followed.but still to no avail.everything went upside down inside out..so i decided to reinstall the whole thing...

buang masa je la beb...

sudo rm -f /usr/bin/gem1.8 /usr/bin/gem
sudo rm -rf /usr/lib/ruby/gems