Posts Tagged ‘Linux’

Preparing Ruby on Rails environment – netbeans

January 25th, 2009 4 comments

In previous steps we have configured ruby and apache, now time to get development environment, there is wide range of tools but we will use Netbeans as it is … quite good.

So on beginning please download Netbeans, please go to it’s download site and get “C/C++” or “PHP” version – they are smaller from the ruby version, we need to update the environment after download so we would download many components again.

After download run the Netbeans installation, it is very simple so just follow the on screen instructions. When Netbeans is installed please run it and go to Tools Menu -> Plugins, there select available plugins and select:

  • Ruby and Rails
  • Ruby Extra Hints
  • Extra Ruby Color Themes

Do not install “Glasfish” or “JRuby” this is needed only for JRuby development which is not production ready, as some people think.

Additionally to installation You can perform update of the installed plugins in the Updates tab, after update and installation Netbeans will ask You to do restart to activate newly installed plugins, please follow it’s instructions.

When we have installed required plugins we can check that Netbeans sees our ruby installation, go to Tools Menu -> Ruby Platforms, here you will see yours ruby installations and it’s configuration, If you do not see any platform go threw the wizard under button Add Platform.

This is the development environmnet, in next part we will start a new project with it.

Categories: Development, Linux Tags: , , ,

Preparing Ruby on Rails environment – apache, ruby

January 24th, 2009 Comments off

In previous article I have described how to setup postgress for development, now is time to continue with the environment. At the beginning we need:

  • ruby as it is base for rails,
  • apache For serving pages,
  • java + netbeans for development.

So installation of required system packages:

emerge -qDNu ruby rubygems apache jdk

/etc/init.d/apache2 start

Install ruby gems that will be needed shortly:

UPDATE: 2009.01.26 added postgres

gem install rails capistrano capistrano-ext passenger postgres

Now we need to integrate passenger into apache – please run:


UPDATED 2009-02-06:

The installation should go without nay problems (If You followed all instructions), at the end You will be asked to modify apache configuration file – few Lines of the output – starting with LoadModule, PassengerRoot and PassengerRuby – should be copied to new apache configuration file, easiest way is to use this commands:

echo “LoadModule passenger_module /usr/lib64/ruby/gems/1.8/gems/passenger-2.0.6/ext/apache2/” > /etc/apache2/vhosts.d/01_passenger.conf

echo “PassengerRoot /usr/lib64/ruby/gems/1.8/gems/passenger-2.0.6” >> /etc/apache2/vhosts.d/01_passenger.conf

echo “PassengerRuby /usr/bin/ruby18” >> /etc/apache2/vhosts.d/01_passenger.conf

Some of the lines may differ from the output form yours passenger so please use Yours as it is better for you.

In next part we will continue with development environment.

compiling and running sax2 on gentoo

January 11th, 2009 2 comments

While using gentoo I get lot of knowleadge of linux internals, i’m very happy of that. But one aspect of this makes me unhappy : X server configuration. While I was using OpenSuSE I get to know SaX2 tool which just configured my X server. Thats how I have thought about getting it run at my gentoo box.

Instruction on how it can be build can be found there: instructions, unfortunatelly folowing them i found few problems so I write my own instruction bellow:

sudo -s 
emerge -1q hwinfo Xinerama
mkdir /root/sax2 && cd /root/sax2
rm -f "./sysp/lib/pci/lib/config.h"
touch svnbuild
make install

And thats all folks, now I was able to configure my video card with no special knowledge of modelines or whatever is needed to write xorg.conf files

Categories: Linux Tags: , , ,

3way gentoo

January 10th, 2009 Comments off

As I’m currently in process of installation gentoo 2008.0, I have learned few things:

  1. do not believe that Your’s system will work after update
  2. try to have backup boot medium like live cd or live usb stick
  3. have your home on separate partition or maintain a backup of it

As my OpenSuSE box beaked down on system update I have thought about going back to Gentoo. This was crucial step as I was really interested to have system build to satisfy my needs.
Gentoo is sort of such systems, it allows full customization of OS. For me it was the only choose, other systems take back the control of the system.

Currently I’m working on 3way Gentoo, which will allow users to safely update their system without loosing current working set of applications.

3way means that in basic configuration the system will be working on 3 system directories, one for compilation, one for system and one for backup. This way (one of 3) user will have always working OS. it is easily possible to make it 2 or 5 way process, as only first two steps are necessary, rest of them is only backup of the working tree.

I should have some results on this topic in next week.

Categories: Linux Tags: , ,

dmraid activation in gentoo kernel

January 7th, 2009 Comments off

Even gentoo handbook says that good build kernel should work without initrd there are some cases that require it, that’s my case. I’m using build in raid from my motherboard, it contains intel ICH9 chipset, this is no true hardware raid, to work it requires software to be run. I have compiled my kernel with all required switches, but it was not seeing my root partition on raid device, so I have run this command

emerge genkernel; genkernel --dmraid ramdisk

This allowed me to boot my manually compiled kernel to run, just added generated initrd to /boot/grub/menu.lst, not sure if this was needed but I have also added option dodmraid to kernel in the same file.

Categories: Linux Tags: , , ,