Posts

Showing posts from February, 2009

Failed attempt to use Mac OS X Leopard stock installation of Ruby on Rails.

Stock installation of RoR, if updated to Rails 2.2.2 fails because it breaks MySQL functionality. Using gem install mysql fails because the stock Ruby interpreter packaged with Xcode 3.0 is only 32 bit and the stock version of MySQL and its libraries for building mysql clients are 64 bit. Link to Chris Cruft's blog about MySQL gem problems Faced the same error messages as in the blog above, and followed basically the same steps. Below is the initial error message when trying to install the mysql gem. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... no checking for mysql_query() in -lmysqlclient... no ***...

Playing with SOAP in Ruby on Rails using WSDL Driver Factory

-First, a little background on why I am using RoR and SOAP. When I helped design and build an inventory and booking system circa 2007, my role was basically systems/business analyst. I also provided the impetus that we build the system using tools beyond simple "procedural" PHP/javascript, and that we look for a web application technology platform which would allow us to rapidly build a system that stored everything in a relational database. Back in 2001, I wondered why I had to write SQL queries for web applications when I knew that if I was working with a well-designed database, there should be techniques to generate queries or even better... a developer could write objects that were basically entities from an ERD and actors from a UML and these objects knew which other objects were related to it and had methods to access all the information without having to write any SQL or be intimately aware of the relationships between tables. So for our inventory and booking system, ...

How to use Ruby on Rails to integrate with a legacy database while leveraging scaffolding.

I am trying to be as lazy as possible... rails_app $ rails independentreps -d mysql Edit config/database.yml with specific database name, host, username, password. Add additional environment records if required. For example: development: adapter: mysql encoding: utf8 database: indrep_development pool: 5 username: root password: pw host: localhost test: adapter: mysql encoding: utf8 database: indrep_test pool: 5 username: ... ... production: ... database: indrep_production ... ## Additional Environment Records legacy_production: adapter: mysql encoding: utf8 database: reps_db pool: 5 username: admin password: letmein host: 192.168.0.10 port: 13540 From within the application folder, use the generation features of the Ruby on Rails framework rails_app $ ruby script/generate model Client rails_app $ ruby script/generate scaffold Client So scaffolding is generated for the first time. Next, edit app/models/client.rb with set_table_name, set_primar...

A quick update on installing and running VMware Server on Vista 32-bit

I had only very minor experience with VMware, having only firsthand experience with it on an iMac with VMware Fusion beta installed. The iMac ran Mac OS X 10.4 and VMware Fusion was used to host a Windows XP guest OS. It ran very slowly, possibly due to the lack of Intel VT-x (Virtualization Technology) on the model of Intel Core 2 Duo. Also, the iMac only had 1 GB of RAM. In early February, 2009, I was compelled to install VMware on my laptop to run a Linux server environment. The laptop is an ASUS F8Sn-B1 with an Intel T8100 and 3GB of RAM. My hope was that performance on this machine would not be a problem. This is just a distillation of some of the issues I discovered while preparing to do the installation. There are several VMware Products, it used to be that the versions you wanted to download were the beta versions (Fusion for Mac, or Server beta). Those versions you could download, install, and run a VMware host for free indefinitely. Now, VMware Server 2.0 is out of be...