Rails upgrade from 1.1.6 to 1.2.3
I have just finished rails and gems upgrade and it was surprisingly smooth. There were just one minor issue.
The server was not able to start. It was teling me something like:
/opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:266:in `load_missing_constant’: uninitialized constant Recconfig (NameError)
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in `const_missing’
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in `const_missing’
from ./script/../config/../config/environment.rb:34
from /opt/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:41:in `run’
from ./script/../config/../config/environment.rb:15
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require’
from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require’
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require’
… 11 levels…
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require’
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:342:in `new_constants_in’
from /opt/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:495:in `require’
from script/server:3
The solution was trivial. We are using an object Recconfig to store configuration of the web site. We do load and initialize the object in the environment.rb. In the 1.1.6 it was enough to write
recconfig = Recconfig.create
in the new version it was necessary to require it.
require ‘recconfig’
|
| Published on June 14th, 2007 | | Posted by Roman Mackovcak |

June 17th, 2007 at 16:46
Are you guys coming to Ostrava on Rails? Thought we could meet up if so..
June 20th, 2007 at 15:24
Sure. Abhishek is going to be there.