Need help not able to run rails server 2.1.0

Hi ,

I am helping out my friend to maintain his website built using ruby 1.8.6 and rails 2.1.0 ...at lesst that what noticed in the production side. i am trying to create the same environment as so mant experts in this forum suggested to meto avoid conflicts and problems..

i was able to create the same environment ( gems,..etc) now i am trying to launch the server but keep getting the following message : i even tried to force but no way

app/controllers/application.rb:5: undefined method `init_gettex' for ApplicationController:Class (NoMethodError)   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:215:in `load_without_new_constant_marking'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:215:in `load_file'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in `new_constants_in'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:214:in `load_file'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:95:in `require_or_load'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:60:in `depend_on'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:456:in `require_dependency'   from /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:18:in `define_dispatcher_callbacks'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:177:in `call'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:177:in `evaluate_method'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:161:in `call'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:90:in `run'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:90:in `each'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:90:in `send'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:90:in `run'   from /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:272:in `run_callbacks'   from /var/lib/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:483:in `send'   from /var/lib/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:483:in `prepare_dispatcher'   from /var/lib/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:151:in `process'   from /var/lib/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in `send'   from /var/lib/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in `run'   from /home/molay/projects/project1/config/environment.rb:19

any help please will be more than appreciated.

thanks

Hi ,

I am helping out my friend to maintain his website built using ruby

1.8.6 and rails 2.1.0 …at lesst that what noticed in the production

side.

i am trying to create the same environment as so mant experts in this

forum suggested to meto avoid conflicts and problems…

i was able to create the same environment ( gems,…etc)

now i am trying to launch the server but keep getting the following

message : i even tried to force but no way

app/controllers/application.rb:5: undefined method `init_gettex’ for

what’s in line 5 of app/controllers/application.rb

ApplicationController:Class (NoMethodError)

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:215:in

`load_without_new_constant_marking’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:215:in

`load_file’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in

`new_constants_in’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:214:in

`load_file’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:95:in

`require_or_load’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:60:in

`depend_on’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:456:in

`require_dependency’

from

/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:18:in

`define_dispatcher_callbacks’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:177:in

`call’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:177:in

`evaluate_method’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:161:in

`call’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:90:in

`run’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:90:in

`each’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:90:in

`send’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:90:in

`run’

from

/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:272:in

`run_callbacks’

from /var/lib/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:483:in

`send’

from /var/lib/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:483:in

`prepare_dispatcher’

from /var/lib/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:151:in

`process’

from /var/lib/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in

`send’

from /var/lib/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:93:in `run’

from /home/molay/projects/project1/config/environment.rb:19

what’s in line 19 of config/environment.rb?

hi , thanks for the quick reply .

1) line 5 has the following :

#init_gettex "text_domain"

2) /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/callbacks.rb:161:

def call(*args, &block)         evaluate_method(method, *args, &block) if should_run_callback?(*args)       rescue LocalJumpError

3) line 19 of config/environment.rb?

# I18n 15:require 'gettext/rails'

17:require 'calendar_date_select'

19:Rails::Initializer.run do |config|

Hi ,

I am helping out my friend to maintain his website built using ruby 1.8.6 and rails 2.1.0 ...at lesst that what noticed in the production side. i am trying to create the same environment as so mant experts in this forum suggested to meto avoid conflicts and problems..

i was able to create the same environment ( gems,..etc) now i am trying to launch the server but keep getting the following message : i even tried to force but no way

app/controllers/application.rb:5: undefined method `init_gettex' for ApplicationController:Class

That mostly sounds like someone has typoed init_gettext

Fred

Frederick Cheung wrote in post #986018:

I think the suggestion is that line 5 of application.rb that has init_gettex on it, should be init_gettext In an earlier post you showed this line commented out (with #) but presumably the error does not appear if it is commented out, likely a different error appears.

I believe you say that the app is working on a different server, check the line there to see what it is. I trust you are picking the source up from a source control system (git for example) in which case you should be able to see whether you have accidentally modified that line. If the source is not in a version control system then get that set up before you do anything and check into the VCS the version that is running on the server. Then check it out onto your system. Do not start editing it until you have got a VCS setup. That is my advice anyway.

Colin

Colin Law wrote in post #986048: