Wiki2
Rails

Ruby On Rails

Gems

Tips and tricks

  • Add redirection in environment.rb
  • Database tables in pluralis (e.g. people)
  • scaffolding models in singularis (e.g. Person)
  • Add default controller/action in config/routes.rb
  • gem update --system - to update gem system. Solved my rails 1.2.3 problem! If that also fails try to install gem manually.
  • Make sure that dispatch.fcgi have the right execution permissions. Dont use zip to move applications!
  • Install WindowsInstikiInstall
  • If rails 2.2.2 or later is used the MacOSMySQLGem must be installed.
  • ruby-debug
  • rake environment RAILS_ENV=test db:migrate

Windows Installation

  • Install InstantRails

  • Unzip and follow README file

  • Install SSL CVS support in Eclipse (Radrails)

  • Start RadRails

  • Set E:\Program\InstantRails\railsapps_ folder at startup.

  • View screencast which is really useful.

  • Install rails through gem so that RadRails Console works (see Instant and RadRails)

  • Install RedCloth

  • Run

  • Start Instant Rails

  • Stop Apache Server1. More convinent to use internal server in IDE.

  • Start IDE and start programming …

    footnote: Note that phpMyAdmin (there is no MySQL admin utility in the IDE) is dependent on Apache in Instant Rails. If the phpMyAdmin is not available through InstantRails console try to close IDE and InstantRails and the restart InstantRails with Apache still running.

MacOS X Leopard installation

Install lighttpd from ports

sudo port install lighttpd

Install MySQL from .dmg package. Tiger package worked.

Install mysql gem

sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Mephisto

Ubuntu installation

Install Eclipse, Aptana and Radrails according to this guide.

Eclipse seems to find CVS environment variables; CVS_ROOT and CVS_RSH.

export CVS_RSH=/usr/bin/ssh
export CVSROOT=:ext:peter@192.168.0.1:/home/cvsroot/

Setup RubyVM according to guide above. Setup under Ruby-Installed Interpreters; RubyVM home directory to /usr (assumes a symbolic link /usr/bin/ruby) and Ruby VM display name to ruby 1.8.6.

There were problems with GEM_HOME wich Eclipse promptly wanted to use GEM_LIB environment variable as root. I had to make a ln -s to the correct path in Ubuntu to come around this problem.

sudo ln -s /usr/lib/ruby/gems/1.8/gems /var/lib/ruby/gems/1.8/gems/gems

You may also set the GEM_HOME variable as an environment variable.

export GEM_HOME=/usr/lib/ruby/gems/1.8

After this you can add gem libraries to the project under <app>-Properties-Ruby Load Path-Libraries-Add Variable.

RedCloth

require 'RedCloth'

Make sure you only have one ruby installation when using InstantRails

EMan

database

application

application local

RailsToDo

RoRIdeas

DittlagCompetition

ANewMarkupEditorHelper