Help in upgrading from 1.1.6 to 1.2.3


#1

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.


#2

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
http://www.oreilly.com/catalog/9780596510657/
“Test Driven Ajax (on Rails)”
assert_xpath, assert_javascript, & assert_ajax


#3

On Jul 7, 3:43 am, “Phlip” removed_email_address@domain.invalid 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:inconst_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:inconstantize’
/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:inrecognize’
/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:inhandle_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:inservice’
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:instart’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:instart’
/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:indispatch’
/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:inrequire’
/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:inrequire’
/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:inrequire’
/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:inrequire’
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.


#4

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” removed_email_address@domain.invalid 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:inconst_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:inconstantize’
/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:inrecognize’
/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:inhandle_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:inservice’
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:instart’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:instart’
/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:indispatch’
/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:inrequire’
/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:inrequire’
/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:inrequire’
/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:inrequire’
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.


#5

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” removed_email_address@domain.invalid 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:inconst_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:inconstantize’
/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:inrecognize’
/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:inhandle_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:inservice’
/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in run' /usr/lib/ruby/1.8/webrick/server.rb:173:instart_thread’
/usr/lib/ruby/1.8/webrick/server.rb:162:in start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:instart’
/usr/lib/ruby/1.8/webrick/server.rb:92:in start' /usr/lib/ruby/1.8/webrick/server.rb:23:instart’
/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:indispatch’
/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:inrequire’
/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:inrequire’
/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:inrequire’
/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:inrequire’
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.


#6

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

has nothing to do with rake.


#7

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:inconst_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. removed_email_address@domain.invalid