How to install Ruby On Rails  Without Connecting to Internet.

I always got a problem since my notebook are not connected to internet and in my office, the internet admin use proxy server for connected to internet. Well… before 2.x I was downloading alll the required gems to install / update new rails. Some websites told me to install proxy server … but i couldnt find any proxy server (it wasnot on the sourceforge anymore) A life without internet is very painfull lol …

well .. today i found an easy way to install Ruby On Rails with just downloading the stand alone packages. Here are the steps: (I assume you have Ruby and Ruby Gem installed already).Rails 2.x use rake 0.73

  • Download the Stand Alone Packages (in Zip or Tar.Gz packages).
  • Extract it on your directory
  • You will have the directory contains many folder. Look at the vendor folder. It is where all you need to do installation ūüôā
  • There are some packages, like activesupport, activerecord, and railties (it is the rails core) etc. In each folder, you can see the pck folder. Inside the pck is hidden gem that you need for installation. Copy all the gems into a folder (let say it is temp folder)
  • type in command windows: gems install rails -l (parameter -l means install localy). The gems will install the dependencies … and just wait it to be done. DONE !!!

You can also install one by one by compiling the install.rb but i have not tried it, it would be easier to install using Gem instead compile one by one ūüėČ

Advertisements
Posted by: Adwin | October 2, 2007

setup console for cakephp (for windows)

cakephp logoYou can get the screencast about how to setup console with cakephp 1.2 in http://cakephp.org, but for you who want to do it quick (downloading the screencast is taking time and bandwith, especially for me) read this quick information. Just text .. no picture ūüôā

  • go to cakephp.org , download the cake 1.2 (this is only works with cake 1.2, because 1.1.x doesnt have console, you can create your own console by creating batch (.bat/.sh) file)
  • right click on the My Computer, click on Properties
  • go to Advances tab , then click on the Environtment Variables button
  • in the system variables, there is aPATH, click to edit.
  • add this string c:\xampp\php;c:\cake1.2\cake\console\ . Notes. I install the php on my c:\xammp\php\ and I unzip the cake in c:\cake1.2\, so depend on your directory, change that lines. Finish.
  • To test it, open the command window. (type cmd on the run)
  • type : cake help and it should show the help file
  • for creating a new project, type cake bake project \www\mynewcakeproject
  • Done .
Posted by: Adwin | October 1, 2007

Looking for a domain name ?

dotcomAre you looking for a domain name ? Is your domain name being owned by someone and they asking you a lot of money for the domain name you want ?  I was the one like you, searching over the domain name, but it owned by a company that doing selling domain names.

Today,¬†I¬†tried¬†again,¬†and¬†I¬†found¬†that¬†my¬†domain¬†names¬†has¬†been¬†refunded¬†(means¬†I¬†can¬†get¬†it¬†with¬†normal¬†price). I know that from refunddomains.com¬†.They¬†publish¬†the¬†domain¬†name¬†that¬†are¬†expired¬†already. But if you want to get a specific domain names, you just type in google like : your_preferred_name*.com site:refunddomains.com , the * is wildcard for everything that matched with it. Good luck, may you find the domains you like the most from that list. ūüėČ

Posted by: Adwin | September 28, 2007

Dynamic subdomains using htaccess

I found this blog  about how to create dynamic subdomain using htaccess. I will try this at home later. Actually you just need to type this on your htaccess with modrewrite
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.yourwebsite.com
RewriteCond %{HTTP_HOST} ([^.]+)\.yourwebsite.com
RewriteRule ^(.*)$ /path_to_your_site/httpdocs/work_out.php?url=%1

This will render abcd.yourwebsite.com into yourwebsite.com/wor_out.php?url=abc
Isnt it simple enough ?
I will try this at home and learn more about mod_rewrite.

In case you want to know more about mod_rewrite, read this cheatsheet  from Ilovejackdaniels.

Posted by: Adwin | September 27, 2007

Crossroad: Which way ?

CrossroadI have read this opinion from Derek Sivers who turn back to PHP after doing some code rewrite using Rails for about 2 years (He was writing the cdbaby.com by himself for about 6 years and it has about 90k lines of code). He also work with some Rails expert todo this project.

When i googling about cdbaby.com, and I found an email from Derek Sivers who announce that he was going to rewrite the entire cdbaby.com using ruby on rails (ror).

I¬†think,¬†they¬†gonna¬†do¬†rewrite¬†but¬†using¬†their¬†old¬†database¬†tables¬†(they¬†have¬†95¬†tables)¬†which¬†is¬†not¬†using¬†Rails’ naming convention. So, they got obstacle in there. I ever tried the same thing before, I was¬†going¬†to¬†make¬†web¬†interface¬†for¬†my¬†application,¬†but¬†I¬†got¬†difficulty¬†because¬†i¬†wont¬†change¬†my database the¬†table¬†name. After that I choose JSF (Visual Web Pack) to make web interface ūüôā

I still wrote the code using PHP for money and still learning ROR (still stuck on Partial lol). I am also still learning doing stuff with cakephp as well… So I will focusing my live just on that 2 framework.

I love ruby on rails for its agile and especially for its activerecord and migration script. It is wonderfull for me. I love to do code with Rails as well.. but I think i need to do some research about that before I made it as one of my main “red shoes” ūüôā

Posted by: Adwin | September 26, 2007

Welcome to the keyboard dance world

Hello World …I would like to introduce to you “my red shoes” before we start dancing. My red shoes called VIM. VIM is text editor that can be found on the Unix, Linux, Windows or Mac. It is open source and free. So you can have the source file as well. I am using GVIM 7.1 (in windows environment).

Why I choose VIM ?

I am not going to start flame about VIM vs other editors. But I will explain base on my own expriences.

  1. Insearch for the plugin.There are many good text editor that you can have, free or comercial one, on the internet. Before, I was using Emacs, JEdit and then switch to Notepad++, before I fall in love with VIM. I dont say the previous are bad, no … I am still using Notepad++ sometimes. I use Jedit sometimes. Emacs not anymore. I was falling in love with VIM since I looking for lightweight (and free) editor for Rails. After trying using Komodo, Jedit and Notepad++, I found this : Rails Plugin for VIM . It is very nice plugin for vim. And then I start thinking to learn about¬†it.
  2. It is free and open source. I¬†am big fans of Linux as well, so I would like to use my editor on both Linux and Windows (Mac, i have none). VIM has been used by many programmers and most of then love it. I looking for the free one because I cannot pay for texteditor yet, lol … I am not live in rich countries where you can buy texteditor although it cost “cheap” (expensive for me, it tooks 2-3 working days to get one that’s about 30-40 US$). And if there is free one why I have to spend on commercial one.
  3. Vim has big community that help me to learn it.  One of my favourite was on Google Groups
  4. VIM is small and light. I dont want to use my memory just for text editor. I prefer to use my memory for other thing such as editing image or listening to the music.
  5. Vim was made not just for one specific language. As web developer I still using PHP and Javascript for some of my project. Sometimes I use Java as well. Therefore, I am looking for the editor that can do such thing.
  6. VIM has good regex search and replace support. I love using regex for common use especially for editing the text,  generating  sql  query, editing html codes and so on. Most of the editors, does support search with Regex but not many able to do replace function. I will explain about regex in another post.
  7. VIM has many plugins that freely available. You could create your own plugins as well. It is fully customized.
  8. You can do programming with VIM. In here i mean, you can do scripting that work with VIM. You can create tetris within your VIM as well.. Isn’t it wonderfull? I would like to learn about that since I would like to use for helping myself someday. Other editor that has ability like this is Emacs.

By these criteria, I choose to start learning vim as my “red shoes”

keyboard dance

Categories