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:inload_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:innew_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:inrequire_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:inrequire_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:incall’
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:incall’
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:ineach’
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:inrun’
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:insend’
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:inprocess’
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:inrun’
from /home/molay/projects/project1/config/environment.rb:19

any help please will be more than appreciated.

thanks

On Mon, Mar 7, 2011 at 11:57 AM, korssane korssane
[email protected]wrote:

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

from
`define_dispatcher_callbacks’

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

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:inprepare_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:insend’
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?

You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.

hi ,
thanks for the quick reply .

line 5 has the following :

#init_gettex “text_domain”

/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

line 19 of config/environment.rb?

I18n

15:require ‘gettext/rails’

17:require ‘calendar_date_select’

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

On 7 Mar 2011, at 03:57, korssane korssane [email protected] wrote:

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

On 7 March 2011 19:53, korssane korssane [email protected] wrote:

Fred

hi Fred,
what i am supposed to do ?

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 L. wrote in post #986048:

On 7 March 2011 19:53, korssane korssane [email protected] wrote:

Fred

hi Fred,
what i am supposed to do ?

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

Thank you collin ,
i wil try and get back to you.

Frederick C. wrote in post #986018:

On 7 Mar 2011, at 03:57, korssane korssane [email protected] wrote:

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

hi Fred,
I have corrected this but now having the following messages :

DEPRECATION WARNING: config.action_view.cache_template_extensions option
has been deprecated and has no affect. Please remove it from your config
files. See http://www.rubyonrails.org/deprecation for details. (called
from send at /var/lib/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:455)

Processing AcceuilController#index (for 127.0.0.1 at 2011-03-07
14:55:15) [GET]
Session ID:
BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo
SGFzaHsABjoKQHVzZWR7AA==–831de6c22a4826c075354d641276753fc18fcffe
Parameters: {“action”=>“index”, “controller”=>“acceuil”}
Rendering template within layouts/application
Rendering acceuil/index
WARNING: You’re using the Ruby-based MySQL library that ships with
Rails. This library is not suited for production. Please install the
C-based MySQL library instead (gem install mysql).

ActionView::TemplateError (Permission denied -
/var/lib/mysql/mysql.sock) on line #2 of acceuil/extra.erb:
1: <% for i in 1…10 do %>
2: <% if Admin::ApplicationParam.isPublished("motd
"+i.to_s)
%>
3:


4:

5: <%=
Admin::ApplicationParam.value_of(“motd_”+i.to_s) %>
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/vendor/mysql.rb:107:in 

initialize' /var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/vendor/mysql.rb:107:innew’
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/vendor/mysql.rb:107:in
real_connect' /var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/mysql_adapter.rb:505:inconnect’
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/mysql_adapter.rb:183:in
initialize' /var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/mysql_adapter.rb:88:innew’
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/mysql_adapter.rb:88:in
mysql_connection' /var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:292:insend’
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:292:in
connection=' /var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:260:inretrieve_connection’
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/connection_adapters/abstract/connection_specification.rb:78:in
connection' /var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:2693:inquoted_table_name’
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1469:in
construct_finder_sql' /var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1341:infind_every’
/var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:1303:in
find_initial' /var/lib/gems/1.8/gems/activerecord-2.1.0/lib/active_record/base.rb:534:infind’
app/models/admin/application_param.rb:44:in isPublished' app/views/acceuil/_extra.erb:2:in_run_erb_47app47views47acceuil47_extra46erb’
app/views/acceuil/_extra.erb:1:in each' app/views/acceuil/_extra.erb:1:in_run_erb_47app47views47acceuil47_extra46erb’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in
send' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:inexecute’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in
send' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:inrender’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/partial_template.rb:20:in
render' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:26:inbenchmark’
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:in
realtime' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:26:inbenchmark’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/partial_template.rb:19:in
render' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:22:inrender_template’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/partials.rb:110:in
render_partial' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:273:inrender’
app/views/acceuil/index.html.erb:5:in
_run_erb_47app47views47acceuil47index46html46erb' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:insend’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:338:in
execute' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:insend’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template_handlers/compilable.rb:29:in
render' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:35:inrender’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/template.rb:22:in
render_template' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_view/base.rb:245:inrender_file_without_gettext’
/var/lib/gems/1.8/gems/gettext-1.92.0/lib/gettext/rails.rb:284:in
render_file' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1108:inrender_for_file’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:841:in
render_with_no_layout' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/layout.rb:251:inrender_without_benchmark’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:51:in
render' /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/core_ext/benchmark.rb:8:inrealtime’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:51:in
render' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1157:indefault_render’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:1163:in
perform_action_without_filters' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:580:incall_filters’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:573:in
perform_action_without_benchmark' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:inperform_action_without_rescue’
/usr/lib/ruby/1.8/benchmark.rb:293:in measure' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:inperform_action_without_rescue’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/rescue.rb:201:in
perform_action' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:insend’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:529:in
process_without_filters' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/filters.rb:569:inprocess_without_session_management_support’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/session_management.rb:130:in
process' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/base.rb:389:inprocess’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:149:in
handle_request' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:107:indispatch’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:in
synchronize' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:104:indispatch’
/var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in
dispatch_cgi' /var/lib/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:35:indispatch’
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:78:in
process' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:insynchronize’
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:76:in
process' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:618:inprocess_client’
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:in each' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:617:inprocess_client’
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in run' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:ininitialize’
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:in new' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:736:inrun’
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in
initialize' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:innew’
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel.rb:720:in run' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:271:inrun’
/var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:in
each' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:270:inrun’
/var/lib/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:127:in run' /var/lib/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:inrun’
/var/lib/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:243
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in
load' /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:inload’
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in
new_constants_in' /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:inload’
/var/lib/gems/1.8/gems/rails-2.1.0/lib/commands/servers/mongrel.rb:64
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire’
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in
require' /var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:innew_constants_in’
/var/lib/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:509:in
require' /var/lib/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require’
/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require’
script/server:6

I know it is frustrated but eealy need some help to fx this
thanks

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs