Wednesday, August 22, 2007

Controllers dont respond when...

I had this problem when the server is running nice and fine, but the controllers wont respond. Look at this post http://railsforum.com/viewtopic.php?pid=36358.

And then I realized the reason for the problem, quite by chance actually, but I found that the current location while launching the server program did matter.

When I start the server from the application-root directory (.../railsapp/sampleApp/ ) using ./script/server it always works fine.

However, if I start the server from .../railsapp/sampleApp/script using ./server it doesnt work.

I think the trick is that from application-root it seems all the application components and directories etc.

Its not a big thing, though I now wish that it was documented properly somewhere.

cheers
raghav..

Saturday, August 11, 2007

Catching up...with rails

Well, I have been reading and experimenting a lot with rails past days.. but didnt really take time out to report anything significant...

First things first, I am deeply interested in this thing now... I am getting more and more into this with each new experiment I come across.

As I mentioned, I have had my experience with web programming, (with Java, J2EE in 2001-2) but that was very different. I was a novice to IT industry in more than one ways... and if I compare what we had to do at that time to make one servlet run on a given app server, current effort looks minuscule. Its just so much more simple.. easy.. I like it.

In the meantime, I have been working on different technologies, really far away from the web world. But, after my brush with ruby, I am actively thinking of getting into more web based app development.

In the days that passed by, I have tried to follow a few tutorials which were really nice starters for me. I list them here...
  1. links courtesy Ruby on Rails site (www.rubyonrails.org). These tutorials might be old in time, but they are still excellent starts for ruby on rails
    1. part 1
    2. part 2
    3. part 3

And then, I got hold of some books on ruby on rails...

Agile web development with rails 2nd Edition, is a masterpiece for rails starters. May be I liked it more given my background in programming, but I have to say, it just such a nice book... I really have to give the writer guys full marks for putting across such a nice book. Great work guys.. keep it up.

Sunday, July 29, 2007

Making the fonts look better on Ubuntu

Hi,

Just found a better way of rendering fonts on Ubuntu..

I was looking for making the fonts look better on my Feisty Fawn. While searching, I hit this - http://jaganath.wordpress.com/2006/07/16/ubuntu-install-log-6-finally-os-x-like-font-rendering-in-linux/

The following page suggests some tips/packages to be installed for better rendering.

http://ubuntuforums.org/showpost.php?p=1041769&postcount=1

However, I must warn that, after installing the attached files, the system will be BROKEN. Not because what he is suggesting is incorrect in any way, rather just because in Feisty fawn the same packages are
  1. available in the repositories
  2. available in newer versions.
And therefore, I would suggest installing the packages from the standard Feisty repository. Following commands can be useful -

sudo apt-get install libcairo2 libcairo2-dev libfreetype6 libfreetype6-dev libxft2

And, lest I forget to mention, run the following command...

sudo dpkg-reconfigure fontconfig-config


Hope that its useful. AND, I must say, the suggestion for the fonts settings work excellently.. absolutely great.



have fun
raghav..

Thursday, July 12, 2007

Introduction to Rails

Well,

I have worked with C, C++, Java and shell scripts in past. And I never really was looking for learning another programming language till I met Mr Marcel Canclini. Marcel as we all call him, is an ardent Apple fan and been playing around with ruby on rails for a few months now.

I intend to make this a record of what I experience with ruby on a regular basis and how I progress...

Order for installing ruby gems locally

For installing ruby on rails basic framework when u dont have access to internet, you could follow the following order of installing gems...

Install Ruby

Install RubyGems

Install different gems

  1. Rake
  2. ActiveSupport
  3. ActionPack
  4. ActionMailer
  5. ActiveRecord
  6. ActionWebService
  7. Rails

Also found some more info on installation of rails when internet connection is actually available. Here's the source of info, the rails wiki site

  1. Installing Ruby
    1. sudo apt-get install ruby irb ri rdoc ruby1.8-dev build-essential
  2. Installing Ruby Gems
    1. sudo apt-get install rubygems
  3. Installing Rails
    1. sudo gem install rails -y
  4. Installing MySql
    1. sudo apt-get install libmysql-ruby mysql-server libmysqlclient15-dev
    2. sudo gem install mysql
Some more documentation on Ubuntu site

Wednesday, July 11, 2007

Ubuntu Feisty Fawn installation on my HP 6710b

As I mentioned in earlier posts, I have had a tough time getting Ubuntu to install on my HP 6710b. Here I try to list the various sources I referred to, and steps I did to get it working ...

I must mention, most of my experience was guided from this page, Unfortunately, it did not work exactly for me, so I thought the need to write my experience.

Other posts which contributed to my knowledge/experience are

I thank all the contributors to these posts, since I believe the collective knowledge was what enabled me to finally achieve this installation successfully at the end. Thanks guys :)
  1. Download and burn the alternate CD for Feisty. The Live CD does not work, and thus breaks the promise of "works out of the box" for this model.
  2. While you boot your system with the alternate CD, enter some extra boot parameters
    1. Press F6 to get to the options screen
    2. In the starting enter break=top
    3. Towards the end of the boot parameters, enter irqpoll, acpi=off noacpi pnpbios=off
  3. After this, your system should boot normally.
  4. Now, the text based installer (remember its the alternate CD not Live CD), will install the OS onto your system. However, when it comes to installing/configuring x server, the system bump you to a command prompt.
  5. At this point, I ran the following (after making sure that I have the network connectivity - at this point ethernet already works)
    1. sudo apt-get update
    2. sudo apt-get dist-upgrade
    3. sudo echo piix >> /etc/initramfs-tools/modules
    4. sudo update-initramfs -u
  6. At this point Reboot your system. Since Grub is already installed, you should normally see a boot menu. Choose Ubuntu from there. DO NOT choose Windows for any reason whatsoever.
  7. After reboot, you have a working Ubuntu system minus X server. Log in as usual, in the text mode.
  8. Perform this sudo apt-get install xserver-xorg-video-intel
  9. Now, take backup of your xorg.conf using
    1. sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bkp
  10. Launch the reconfigure command for xserver configuration using sudo dpkg-reconfigure xserver-xorg
  11. And, then take the pain of configuring everything manually.. not automatically. Among, the following steps, I am not sure about the sequence of some.. but more or less, gives you an idea of what comes across..
    1. Be careful, not all options work good with default values, though most of them do.
    2. Do not choose to do an auto-detect for your screen. NO.
    3. Choose manually everything that you can for your screen. It asks you for a level of configuration that you want to do, and gives options like Simple, Intermediate, Advanced... there choose Simple.
    4. Choose a screen size (15" I think)
    5. Choose Resolution.. Careful to choose the widescreen resolutions
    6. Decide on memory to be allocated. I chose 256MB
    7. Choose color Depth : I chose 24 bit
    8. Towards the end, it would ask you to write the configuration to disk, obviously choose yes.
    9. it would exit without trying to start x.
  12. Now, just type at command line, startx, should work.
  13. Once you are in x session, install the driver suggested at intel X3100 Drivers post , Do the configuration as suggested in the post. It works.
  14. The X server configuration is done now, the system can be rebooted, and would automatically go into x mode.
  15. Lest I forget, Go to the Grub menu (/boot/grub/menu.lst) and update the windows vista boot point description. Both normal boot point and recovery boot point have same label by default. If you boot into recovery mode by mistake, the MBR is overwritten.... :(
I can only hope that others would be benefitted by this experience. Unfortunately I did not keep on the fly notes for the whole process, So, quite a bit of this is based on my recollection.

hth
regards
raghav..