From: Hongli Lai Date: 2008-08-15T00:50:31+09:00 Subject: Re: Ruby without Rails unknown wrote: > Hello! > > I have a Rails application, and now I'm trying to make a cgi-script > out of Rails, but it should operate with Rails database and models. > [...] > My configuration: > Ubuntu 7.10 > Apache 2.2.4 + mod_ruby + mod_fcgid > Ruby 1.8.6 > Rails 2.1.0 mod_ruby hasn't been maintained since 2006, and people generally avoid it. FastCGI is in a similar situations: people tend to avoid it because its implementation has all kinds of problems. Maybe you should consider using Rack [1] in combination with Phusion Passenger [2] instead? [1] http://rack.rubyforge.org/ [2] http://www.modrails.com/ > Problem 2. > One of my models "acts as tree" in the Rails application. But how can > I make it to work in my cgi-script? > I have tried: > require 'vendor/plugins/acts_as_tree/lib/active_record/acts/tree.rb' > But it doesn't help. Do 'require "config/environment"'. This will load the Rails environment and initialize plugins, but you will retain full control over how the application processes HTTP requests. -- Posted via http://www.ruby-forum.com/.