RCMS-0.3.1

Chandrahas Reddy ha scritto:

HI i am new to ruby rails . I downloaded the project RCMS-0.3.1 and
began working on it. I am getting the error like

undefined method `init_gettext' for ApplicationController:Class

.
And the application contoller is somewhat like ths. Some one plz help
me.

require_dependency 'login_system'
require 'rcms'
require 'gettext'

GetText.output_charset = "UTF-8"

class ApplicationController < ActionController::Base
  include LoginSystem
  model :user
  model :role
  model :rcms_log
  model :component_config
  model :channel
  # ferret!
  model :result

  before_filter :crumps
  cattr_accessor :rlogger

  protected

  @@rlogger = Logger.new("#{RAILS_ROOT}/log/rcms.log")
  @@rlogger.level = Logger::DEBUG

  init_gettext "rcms"
  #def init_gettext
  # "rcms"
    # The locale is set automatically or uses Cookie value, parameter
"lang".
    #bindtextdomain("rcms", request.cgi, RcmsConfig.instance.site_lang)
  # @headers["Content-Type"] = "text/html; charset=UTF-8"
  #end

  def crumps
    arr = request.env_table['REQUEST_URI'].sub(
/(http:\/\/[^\/]*){0,1}\/(.*)/, '\2' ).sub( /([^?]*)\?.*$/, '\1'
).split('/')
    @crumps = ""
    tmp = ""
    for word in arr
      unless word =~ /\.html/
        tmp << "/" << word
        @crumps << "<a href=\"" + tmp + "\">" + word.gsub(/_/,' ') +
"</a>&nbsp;&raquo;&nbsp;"
      end
    end
    # this is damn dirty... :wink:
    @crumps.chomp!('&nbsp;&raquo;&nbsp;')
    @crumps
  end

  def dblog(msg,level)
    ip = @request.env_table['REMOTE_ADDR']
    user = @session[:user]
    begin
      Rcms::DbLog.log({:ip => @request.env_table['REMOTE_ADDR'],
                      :message => msg,
                      :level => level,
                      :user => @session[:user] } )
    rescue Exception => e
      logger.warn "application - controller caught logexception...#{e}"
    end
  end

end

I don't know RCMS project but I think you must install gettext (gem install gettext)

Good luck !