Forum: Ruby on Rails RCMS-0.3.1

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F08c4cddfa0731ef29311d78f3264017?d=identicon&s=25 Chandrahas Reddy (chandoo)
on 2007-02-02 07:17
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... ;)
    @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
110e527af05961700d9e39285d043b62?d=identicon&s=25 Gianluca Tessarolo (Guest)
on 2007-02-02 09:58
(Received via mailing list)
Chandrahas Reddy ha scritto:
> require 'rcms'
>   model :channel
>
>   def crumps
>       end
>       Rcms::DbLog.log({:ip => @request.env_table['REMOTE_ADDR'],
>
I don't know RCMS project but I think you must install gettext (gem
install gettext)

Good luck !
F08c4cddfa0731ef29311d78f3264017?d=identicon&s=25 Chandrahas Reddy (chandoo)
on 2007-02-02 12:30
Gianluca Tessarolo wrote:
> Chandrahas Reddy ha scritto:
>> require 'rcms'
>>   model :channel
>>
>>   def crumps
>>       end
>>       Rcms::DbLog.log({:ip => @request.env_table['REMOTE_ADDR'],
>>
> I don't know RCMS project but I think you must install gettext (gem
> install gettext)
>
> Good luck !

I did it already. I get that the gettext is working fine but still i was
getting the same error. If it is possible for u plz go thru the link and
give me the answer for my problem.

http://rcms.oopen.de/Documentation/28.html

Any answer will be really appreciated and thankfull
E0c987f680cd640c14912ebfbf0f0f07?d=identicon&s=25 unknown (Guest)
on 2007-02-02 23:40
(Received via mailing list)
On 2/2/07, Chandrahas Reddy <rails-mailing-list@andreas-s.net> wrote:
> 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

Are you using Rails 1.1.6 or 1.2.1?
Cfcf8f480f37f5d98d925c3d72b84806?d=identicon&s=25 chandoo.. (Guest)
on 2007-02-05 05:25
unknown wrote:

>
> Are you using Rails 1.1.6 or 1.2.1?


I am using 1.2.1 version of rails
This topic is locked and can not be replied to.