Saturday, August 29, 2009

installing mysql bindings for ruby

Courtsey: Daniel Lorch

To install mysql bindings for ruby, use this command
#gem install mysql

You might get the following error:

"extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)"

This probably means that you forgot to install the ruby1.8-dev package. Just do an apt-get install ruby1.8-dev to fix this.


Again after this you might this error:

"Could not create Makefile due to some reason [..] Check the mkmf.log file for more details. [..]"

You should do what the error message tells you: check the mkmf.log! Search for this file using find /usr/lib/ruby/gems/1.8/gems/ -name mkmf.log. Usually, this error message appears because you forgot to install the -dev package for the extension you were trying to install. So if you wanted to install the mysql gem, you probably forgot to install the libmysqlclient14-dev first. Do an apt-cache search | grep dev to find the appropriate packages.

Courtsey: Simon Josefsson Datakonsult

RAILS_ENV=”production”

(in /home/redmine/redmine)
rake aborted!
No such file or directory - /tmp/mysql.sock

(See full trace by running task with –trace)

The problem is that you need the Ruby MySQL wrappers. This isn’t really clear from the error message. Install it using:

# apt-get install libmysql-ruby

Monday, August 24, 2009

wget to rescue

How often has your download stopped after 99% of download while downloading from Firefox just because your internet connection was lost for a moment or because there was no space in your partition? And you must have sweared in anger but restarted the whole download. Well you dont have to do it any longer as wget is there to rescue your downloads.

Everyone must have known wget's feature to download a partially downloaded file. Well you will be shocked to know that wget can download the partially downloaded file even if it was downloaded using Firefox.

Firefox downloaded usually downloads the file in .part. So all you have to do is rename the .part file to the actual file name.
Then run the command:
wget -c "link of the server from which it was downloading"

Thats it and wget will resume your download as if your internet connection was not lost at all.

Sunday, August 16, 2009

After windows reinstallation, Linux no longer boots!, How do I restore GRUB?, I have lost my GRUB, how do I find it again?, I have reinstalled Windows

This solution is helpful when you have a LIVE CD.
Courtsey: Thinkdigit forum.
1. Boot from a Live CD, like Ubuntu Live CD or similar.

2. Open a Terminal. Go SuperUser (that is, type "su"). Enter root passwords as necessary. (in kanotix you need to set the passwd for root yourself. Use:
$ passwd root

3. Type "grub" which makes a GRUB prompt appear.

4. Type "find /boot/grub/stage1". You'll get a response like "(hd0)" or in my case "(hd0,3)". Use whatever your computer spits out for the following lines.

5. Type "root (hd0,3)".

6. Type "setup (hd0,3)". This is key. Other instructions say to use "(hd0)", and that's fine if you want to write GRUB to the MBR. If you want to write it to your linux root partition, then you want the number after the comma, such as "(hd0,3)".

7. Type "quit".

8. Restart the system. Remove the bootable CD.


Source: http://ubuntuforums.org/showthread.php?t=42030

If the Step 3 doesn't work, then instead of typing "su" and then "grub" type "sudo grub". Then continue with Step 4.

Also if GRUB was your main boot loader then use (hd0) in Step 6, otherwise (hd0,x), where 'x' is your Linux Boot Partition (in case you are using some other boot loader, like Vista's Boot Loader for e.g.).


But if you dont have a LIVE CD, then SUPERGRUB is a perfect solution. I have not used it myself, so cant give any good review about it. However you can find more details for your solution here.

Saturday, August 15, 2009

Check List of essential features of websites for small businesses

A well written article on this subject can be found here. This is just a check--list i created after going through that web-site.
1) Basic:
  1. Thier Location
  2. Their Hours of Operation
  3. Contact Information
2) About:
  1. Business of the company
  2. Profiles of founder and other importent staff of the company.
3) Offering: Products and services

4) Portfolio: Examples of ongoing projects or previous commitments

5) NEWS Room: Articles and Accolades

6) Links: Other presence of the company on the web

7) Photo Gallery:

8) Calendar: To inform about the upcoming events

9) Blog:

10) Contact:

11) Send to Friend & share:

12) Printer Friendly Pages:

13) Email Signup:

14) E-commerce:

15) Donations:
 
Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 Generic License.