Monday, April 21st, 2008

Converting Paradox tables to MySQL sql in Linux

Problem
You want to convert some legacy tables created in Paradox (.db, .px) to another format so you can use it in MySQL.
Solution
Download the px tools from here.
Follow the instructions, in the INSTALL file after you untar the file.
You should have to do the usual three step linux installation:
configure
make
sudo make install
Afterwards to make sure that the [...]

No Comments » - Posted in linux by kosmas

Friday, April 11th, 2008

Installing sqlite3-ruby in Mandriva and Rails 2.0.2

Problem
After upgrading to Rails 2.0.2 when trying to install the sqlite3-ruby gem got the following error:

ERROR: Error installing sqlite3-ruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb install sqlite3-ruby
checking for sqlite3.h… no
make
make: *** No rule to make target `ruby.h’, needed by `sqlite3_api_wrap.o’. Stop.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.2.1/ext/sqlite3_api/gem_make.out
Solution
In [...]

No Comments » - Posted in linux, ruby on rails by kosmas

Wednesday, February 27th, 2008

Checking out a remote CVS project

Problem
You want to use cvs to checkout a repository from a remote server.
Solution
If you were using subversion it would be very simple to do by using the remote url.
In CVS you have to to do the following:
First find out where the cvsroot in the remote server is. We will assume for this example that is [...]

No Comments » - Posted in linux by kosmas

Tuesday, February 26th, 2008

Ruby On Rails on CentOS 4.6

Problem
Installing Ruby on Rails on CentOS 4.6.
The yum install ruby installs an old version of Ruby 1.8.1, but you want 1.8.6
Solution
Based on a script from uberdose
The original post is here:
http://wp.uberdose.com/2007/07/15/ruby-on-rails-on-centos-45/

wget ftp://ftp.gnu.org/gnu/readline/readline-5.1.tar.gz
tar xvfz readline-5.1.tar.gz
cd readline-5.1
./configure –prefix=/usr/local
make
sudo make install

cd ..
wget [...]

No Comments » - Posted in ruby on rails by kosmas

Wednesday, February 6th, 2008

Password - less logins and aliases with ssh

Problem
You want to be able to login to different servers with ssh, but don’t want to be using your password every time.
Solution
We assume that you already have installed ssh and have created ssh public keys in your local machine.

Run the following in your local machine:
ssh-copy-id -i ~/.ssh/id_rsa.pub user_name@remote_host

If you want to add aliases in your [...]

No Comments » - Posted in linux by kosmas

Friday, January 25th, 2008

Combining multiple ps pages into a multiple page pdf file

Problem
You have a lot of ps files and you want to combine them into a single pdf file with multiple pages.
Solution
You can use Ghostscript:
gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.ps in2.ps in3.ps

No Comments » - Posted in linux by kosmas