Forum: Ruby on Rails Help in upgrading from 1.1.6 to 1.2.3

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.
addicttux (Guest)
on 2007-07-07 11:40
(Received via mailing list)
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.
Phlip (Guest)
on 2007-07-07 12:44
(Received via mailing list)
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
addicttux (Guest)
on 2007-07-08 11:31
(Received via mailing list)
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: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.
Matthew Rudy J. (Guest)
on 2007-07-09 01:08
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: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.
Matthew Rudy J. (Guest)
on 2007-07-09 01:08
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: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.
Matthew Rudy J. (Guest)
on 2007-07-09 01:10
sorry,
the first one was wrong.
I meant "your version of rubygems"

has nothing to do with rake.
addicttux (Guest)
on 2007-07-09 19:47
(Received via mailing list)
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. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.