Wednesday, 30 January 2008

rails 2.0 with sql-server

gem install activerecord-sqlserver-adapter --source=

get the Ruby-dbi from this site rubyForge

After downloading it, use WinAce (or something else )to unpack the files and copy the following file lib/dbd/ADO.rb to /ruby/lib/ruby/site_ruby/1.8/DBD/ADO/ADO.rb

Now insert the following in the database.yml file (in \config dir of your rails app)

adapter: sqlserver
database: "DATABASENAME"
host: .
username: "USERNAME"
password: "PASSWORD"

where databasename, username, and password (remove comeplete tag) should be inserted. and if the sql server is not running on the local host, then the "." should be exchanged to the proper path. fx. if my server was called "ruby" and my username was "user" and password was "user" then it should look like this:

adapter: sqlserver
database: ruby
host: .
username: user
password: pass

How to get ruby on rails

To get rails, one can just download ruby, and then ask it to fetch the gems, that contains rails.

First download ruby (following link is to the currently most present version):

when everything is installed correctly, run the following command:

C:\private\projects\ruby>gem install rails --include-dependencies

this will generate the following output:

C:\private\projects\ruby>gem install rails --include-dependencies
Bulk updating Gem source index for:
Successfully installed rails-2.0.2
Successfully installed activesupport-2.0.2
Successfully installed activerecord-2.0.2
Successfully installed actionpack-2.0.2
Successfully installed actionmailer-2.0.2
Successfully installed activeresource-2.0.2
Installing ri documentation for activesupport-2.0.2...
Installing ri documentation for activerecord-2.0.2...
Installing ri documentation for actionpack-2.0.2...
Installing ri documentation for actionmailer-2.0.2...
Installing ri documentation for activeresource-2.0.2...
Installing RDoc documentation for activesupport-2.0.2...
Installing RDoc documentation for activerecord-2.0.2...
Installing RDoc documentation for actionpack-2.0.2...
Installing RDoc documentation for actionmailer-2.0.2...
Installing RDoc documentation for activeresource-2.0.2...

Now to the coding!

Tuesday, 8 January 2008

MS video and youtube

Isnt it wonderful with Microsoft. I just read in a Danish paper that Bill Gates is leaving Ms, and that he have made a video about his last day at work. The article included a link to MSN video, to where the video should be. Instead I get "Sorry the video is unavailable". Going to YouTube (The competition), search "Bill Gates", and the Video starts.... The following, is the YouTube video. which works:

Bravo Microsoft.

Monday, 7 January 2008

Do we learn from our mistakes

Its always very easy to tell when something has gone wrong during a project, and often also easy to see why its has gone wrong. Yet on the next project, the same things often goes wrong.

Then what ? Get use to the fact that history repeats its self, or try to actuly think and learn about things that were good and bad, in just finished projects, and try to avoid pitfalls and enhance good tricks. This revolutionary thought is being examined in the following Google representation, given by Diana Larsen: