Help in upgrading from 1.1.6 to 1.2.3

Hi, I was developing a rails app with version 1.1.6 that just worked
fine.

I decided to upgrade to 1.2.3 and then, I keep getting that horrible
message:

“Application error
Change this error message for exceptions thrown outside of an action
(like in Dispatcher setups or broken Ruby code) in public/500.html”

Now, before starting script/server I modiffied config/environment.rb
and changed the value of RAILS_GEM_VERSION from 1.1.6 to 1.2.3

It did not work, so I run ‘rake rails:update’ and, again, the same
mistake

Any ideas about what could be wrong?

The funny thing is that if I change back the value of
RAILS_GEM_VERSION to 1.1.6, everything works fine again.

addicttux wrote:

Any ideas about what could be wrong?
What’s the webserver’s error_log say?

(Parallel question - what does script/server give?)


Phlip
Test Driven Ajax (on Rails) [Book]
“Test Driven Ajax (on Rails)”
assert_xpath, assert_javascript, & assert_ajax

On Jul 7, 3:43 am, “Phlip” [email protected] wrote:

assert_xpath, assert_javascript, & assert_ajax
Hi Philip

The log/development.log says:

Expected script/…/config/…/app/controllers/jiro_controller.rb to
define JiroController
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:249:in load_missing_constant' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:452:in const_missing’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:464:in const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ inflector.rb:250:in constantize’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
core_ext/string/inflections.rb:148:in constantize' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ routing.rb:1284:in recognize’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:in handle_dispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in
service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in service’
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:in start_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in start’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:in start’
/usr/lib/ruby/1.8/webrick/server.rb:82:in start' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:in dispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/
webrick.rb:59
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in require’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:342:in new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in require’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in require’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:342:in new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in require’
script/server:3

Now, jiro_controller.rb is like my index, it is the main page of the
application. It holds the links to the others controllers.

When you get an error like
“Expected script/…/config/…/app/controllers/jiro_controller.rb to
define JiroController”

It normally means there’s a “require”, “require_gem”, “gem”, or
something similar at the top which isnt working.

Go into ruby script/console
and type
“JiroController”

normally you’ll get a better error report.

Alternatively,
it’s worth noting that as of 1.2.3, the rails boot.rb expects you to
have a newer version of “rake”

as it no longer uses the “require_gem” method, which has been
deprecated.

check your version of rake,
perhaps going into irb and type
require “rubygems”
gem “rails”

or something of that sort.

if that doesn’t work,
update your rake.

addicttux wrote:

On Jul 7, 3:43 am, “Phlip” [email protected] wrote:

assert_xpath, assert_javascript, & assert_ajax
Hi Philip

The log/development.log says:

Expected script/…/config/…/app/controllers/jiro_controller.rb to
define JiroController
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:249:in load_missing_constant' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:452:in const_missing’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:464:in const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ inflector.rb:250:in constantize’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
core_ext/string/inflections.rb:148:in constantize' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ routing.rb:1284:in recognize’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:in handle_dispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in
service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in service’
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:in start_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in start’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:in start’
/usr/lib/ruby/1.8/webrick/server.rb:82:in start' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:in dispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/
webrick.rb:59
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in require’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:342:in new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in require’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in require’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:342:in new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in require’
script/server:3

Now, jiro_controller.rb is like my index, it is the main page of the
application. It holds the links to the others controllers.

When you get an error like
“Expected script/…/config/…/app/controllers/jiro_controller.rb to
define JiroController”

It normally means there’s a “require”, “require_gem”, “gem”, or
something similar at the top which isnt working.

Go into ruby script/console
and type
“JiroController”

normally you’ll get a better error report.

Alternatively,
it’s worth noting that as of 1.2.3, the rails boot.rb expects you to
have a newer version of “rubygems”

as it no longer uses the “require_gem” method, which has been
deprecated.

check your version of rubygems,
perhaps going into irb and type
require “rubygems”
gem “rails”

or something of that sort.

if that doesn’t work,
update your rubygems.

addicttux wrote:

On Jul 7, 3:43 am, “Phlip” [email protected] wrote:

assert_xpath, assert_javascript, & assert_ajax
Hi Philip

The log/development.log says:

Expected script/…/config/…/app/controllers/jiro_controller.rb to
define JiroController
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:249:in load_missing_constant' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:452:in const_missing’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:464:in const_missing' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ inflector.rb:250:in constantize’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
core_ext/string/inflections.rb:148:in constantize' /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/ routing.rb:1284:in recognize’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in
dispatch' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:in handle_dispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in
service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in service’
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:in start_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in start’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:in start’
/usr/lib/ruby/1.8/webrick/server.rb:82:in start' /usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:63:in dispatch’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/servers/
webrick.rb:59
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in require’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:342:in new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in require’
/usr/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/server.rb:39
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in
require' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in require’
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/
dependencies.rb:342:in new_constants_in' /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/ dependencies.rb:495:in require’
script/server:3

Now, jiro_controller.rb is like my index, it is the main page of the
application. It holds the links to the others controllers.

sorry,
the first one was wrong.
I meant “your version of rubygems”

has nothing to do with rake.

Thanks for your answer Matthew

See on my laptop I have version 1.1.6 for wich the code I have been
writing work. In my laptop I have installed version 1.2.3 and in my
desktop computer, I have installed only the latest versions of
everything (rake 0.7.3, rails 1.2.3 and so on)

After modifying config/environment.rb and set RAILS_GEM_VERSION =
‘1.2.3’ in both computers I got the same error.

Now, I did the script/console and got:

addicttux@suse64:~/Desarrollos/jiro> script/console
Loading development environment.
/usr/lib64/ruby/gems/1.8/gems/actionwebservice-1.2.3/lib/
action_web_service/container/action_controller_container.rb:74:in
`require_web_service_api’:NameError: neither ApplicationApi or
ApplicationAPI found

JiroController
LoadError: Expected script/…/config/…/config/…/app/controllers/
jiro_controller.rb to define JiroController
from /usr/lib64/ruby/gems/1.8/gems/activesupport-1.4.2/lib/
active_support/dependencies.rb:249:in load_missing_constant' from /usr/lib64/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/dependencies.rb:452:in const_missing’
from /usr/lib64/ruby/gems/1.8/gems/activesupport-1.4.2/lib/
active_support/dependencies.rb:464:in `const_missing’
from (irb):1
exit

Now, I have no idea about this wire thing, in 1.1.6 works and in 1.2.3
does not.

Today I will start simulating the creation from 0, I mean, ‘rails
jiro’ and start adding file by file, constantly testing, to see what
is making this wire behavior.

Mean while, any suggestions are more than welcome.

On Jul 8, 4:10 pm, Matthew R. [email protected]