If you want to use PostgreSQL with the NetBeans Ruby support, there are a couple of things you need to do to get started.
Before you follow these steps, be sure you have gotten your environment set up correctly for Ruby. If you're using the native Ruby support in SXDE, see this page. If you're using JRuby, see this page.
You should also follow these simple steps for getting the PostgreSQL service started on SXDE.
First of all, you need to install the PostgreSQL adapter for ActiveRecord.
Start up NetBeans, and go to Tools->Ruby Gems. Search for 'postgres' and select 'postgres-pr'. This is the adapter written in Ruby. The native adapter currently is not working in SXDE (it needs to be compiled, which requires extra header files from PostgreSQL, which aren't available by default in SXDE).
Then to use PostgreSQL, just pick it as your adapter when you're creating the Ruby project:
If you're using JRuby, you need to edit your database.yml file and uncomment the lines starting with host and port. This is because by default the adapter tries to use the UNIX file socket to connect to a local PostgreSQL server, and JRuby doesn't support that in NetBeans 6.0.
With that, you should be good to go.
| postgres-1.jpg | ![]() |
143620 bytes |
| postgres-2.jpg | ![]() |
79671 bytes |
| postgres-3.jpg | ![]() |
176892 bytes |