You are here

programming

Setting up a git server on MacOS X Lion

Recently I found this nice tutorial on how to setup a git server on a Mac OS X Lion.
It goes straight to the point and you can setup the server using apache real quick!

Enjoy!

Update on October, 15th 2011: Since the referred website has been down a few times the past few days, I have added below the most important steps for setting up the git server on a MacOS X Lion.

Ruby on Rails on Mac OS Lion MysqlCompat::MysqlRes Error

If you are running ruby in Mac OS X Lion and are having trouble with MySQL with the ever annoying message "uninitialized constant MysqlCompat::MysqlRes please do not spend the hours I did trying to solve it. Here is how to do it. The instructions below assume you have a 64 bits processor.

Attempt to run Rails Server creates a folder named 'server'

If you are attempting to execute the rails server by executing rails s or rails server and instead of having the server started you only get a folder named 'server' or the usage help message for the rails command, you are most probably running rails version 2.x.
For this version of rails you must use the command ruby script/server to start the server.

Developing Rails Application on Mac OS X Leopard

Apple provides a nice tutorial on how to start developing using Rails on a Mac OS.
If you are new to the Mac World, it is of great help.

Solve the "uninitialized constant ApplicationController" Problem

Have you just updated your rails version from 2.2.2 to 2.3.5 (or later) and you are getting the strange error message below?

uninitialized constant ApplicationController

This happens because the application controller is no longer called application.rb.
It is now know as application_controller.rb.

There is a rake task to do the renaming automatically for you. Simply run:

rake rails:update

PHP and Eclipse IDE Indigo - Missing Anything?

Due to lack of a package maintainer for the Eclipse Indigo release there is no PHP (PDT) package included. If you would like to install PDT into your Eclipse installation you can do so by using the Install New Software feature from the Help Menu and installing the PHP Development Tools (PDT) SDK Feature from the Eclipse Indigo Repo >> http://download.eclipse.org/releases/indigo

Installing Rails Plugins in Windows

If you are using RoR (Ruby on Rails) and Windows to develop you probably ran into this problem. You want to install a Plugin and use it in your application, so you find some tutorial or links anywhere on the big WWW and when you copy/paste the links they do not work and you get an error message telling you that this is not an executable file. Much like this:

C:\repository\ruby\project>script\plugin install git://github.com/dougal/daemon_generator.git
'script\plugin' is not recognized as an internal or external command, operable program or batch file.

Measurement of Code Quality

Rails Tricks

Do you know what the command below would do?

post.select(&:activated?).collect(&:title)


Do you want to get maximums, minimums, averages, or sums for data in your tables? Did you know ActiveRecord has a .to_xml() method?

Undefined method cache_template_extensions when migrating to Rails 2.3.5

After upgrading from Rails 2.0.2 to Rails 2.3.5 I got the following error message on startup of the server:

`send': undefined method `cache_template_extensions=' for ActionView::Base:Class (NoMethodError)

The solution is as simple as removing (or commenting out) the property 'cache_template_extensions' from 'configuration/environments/development.rb' as it no longer exists in rails 2.3.5.

Pages

Subscribe to RSS - programming