The key to a successful online web development community is accurate and accessible documentation for everyone. That is why the Rails community came up with its own Rails wiki so that users can contribute information and other helpful tips to fellow Rails users. The Rails wiki has everything from the how-to’s in getting started with Rails (installation guides, tutorials, books and FAQ, troubleshooting, tip sheet for beginners, etc.) to community announcements (trainings and job postings, development firms, etc.). One can also find in the Rails wiki the lists of online help groups for Rails users (forums, IRC, user groups, ProblemBase, etc.)
You can always debug your application and get it back on the rails if ever it something goes wrong. You have to check the application log files. See to it that „tail -f“ commands are running on the server.log and development.log. Rails will then show debugging and runtime information to these files and debugging information will also be displayed in the browser on requests from 127.0.0.1.
Using the Ruby logger class from inside your controllers, you can also log your own messages directly into the log file from your code like:
class WeblogController def destroy
@weblog = Weblog.find(params[:id])
logger.info(„#Time.now Destroyed Weblog ID ##@weblog.id!“)
There are a lot of web servers that are compatible with Rails, but Apache and Lighttpd are said to be the most popular. Any web server that supports mod_ruby (Apache), CGI, or SCGI can be used for running Rails. You may also want to try tinkering with Lighttpd, which can rival Apache 2.0.54 in speed, by using MPM Worker on Debian 3.1 (claimed to be faster than Apache 1.x or2.x MPM Prefork). However, working with Lighttpd-1.4.10 can be very buggy so you might want to consider using Lighttpd-1.4.11 or a newer version instead. Zed Shaw’s Mongrel, a ruby based webserver that utilizes Cextensions to increase performance, is also another good option. You can run Mongrel on its own or in a cluster behind an Apache or a Lighttpd proxy.
Create a directory for all of the software you are going to download and installed. In this example, the created directory is „temp“ at the root of the files system, but you can use any name and location you like.
chmod 775 temp
Now, download, configure and install Ruby. Wget is used in this example:
tar -zxvf ruby-1.8.2.tar.gz cd ruby-1.8.2
Specify an install directory since there are times when you won’t have permissions to install things in normal directories. Here, we can see the „configure“ script for Ruby, creating a directory inside „/usr/local“ for installation:
./configure -prefix=/usr/local/ruby -exec-prefix=/usr/local/ruby
Now, you have a Makefile that you can compile:
Your Ruby is now installed. You should try making a symbolic link to Ruby somewhere in your local path:
ln -s /usr/local/ruby/bin/ruby /usr/local/bin/ruby