Showing posts with label RoR. Show all posts
Showing posts with label RoR. Show all posts

Thursday, December 28, 2006

Mysql Decimal Precisin Scale - Doesn't work

In Rails Migration scripts if a table column is defined as
t.column :my_decimal_column, :decimal, :precision =>8, :scale =>2, :default =>0.00, it would result with a column decimal(10,0) in Mysql db. The problem is with the current stable rails. With Edgerails, it will work.

Visit EdgeRails at http://wiki.rubyonrails.com/rails/pages/EdgeRails

A work aroung for this could be, in your migration script use:

execute "alter table my_table modify column my_decimal_column decimal(8,2)" instead.

Sunday, December 24, 2006

Setting up RoR dev environment in Ubuntu 6.10


1. Download and install eclipse
sudo apt-get install eclipse
2. Start Eclipse
Applications->Programming->Eclipse
3. If it fails complaining jre not found at /usr/lib/j2sdk1.4-sun/bin, copy from /usr/bin
cd /usr/lib
mkdir j2sdk1.4-sun
cd j2sdk1.4-sun
mkdir bin
cd bin
cp /usr/bin/java .
4. Start Eclipse
Applications->Programming->Eclipse
5. Install Subclipse plugin
Help->Software Updates->Find and Install
Select Search for new features to install
Click New Remote Site and enter
Name: Subclipse URL: http://subclipse.tigris.org/update_1.0.x
...
Finish Installation and restart Eclipse
6. Install Ruby Development Tools (RDT) plugin
Help->Software Updates->Find and Install
Select Search for new features to install
Click New Remote Site and enter
Name: RDT URL: http://updatesite.rubypeople.org/release
...
Finish Installation and restart Eclipse
7. Install Radrails plugin for Ruby on Rails development
Help->Software Updates->Find and Install
Select Search for new features to install
Click New Remote Site and enter
Name: RadRails URL: http://radrails.sourceforge.net/update
...
Finish Installation and restart Eclipse
8. Setup svn repository
Windows->Open perspective->Other and select SVN Repository Exploring
In the SVN Repository view right click and select New->Repository Location
Enter your repository location like: http://myproject.svnrepository.com/myproject/trunk
Enter user id and password