Some Tips for Upgrading to Rails 1.2.x

Bellow are some issues that I met when upgraded from rails 1.1.6 to 1.2.x:

1.About enrivonment.rb
Make sure your application configuration behind:

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

I met this issue when I put following code:

require 'environments/localization_environment'
require 'localization'
Localization::load_localized_strings
require 'environments/user_environment'

before that closure, which works under 1.1.6, but don't under 1.2.x

2.About ActionMailer::Base.server_settings
If you get errors like:

uninitialized constant ActiveSupport::Deprecation::RAILS_DEFAULT_LOGGER (NameError)

try to change your ActionMailer::Base.server_settings to ActionMailer::Base.smtp_settings

3.Put all "include" statements inside class definitions
You must put include statements inside class/module definitions instead of outside a class/module definition in Rails 1.2.x. Otherwise, you'll get:

Error calling Dispatcher.dispatch #<NameError: cannot remove Object::COPYRIGHT>

  • Posted: 2007-03-07 16:00
  • Author: dcaoyuan
  • Categories: Java

Comments

1. pan cunwu -- 2007-03-10 16:00

hello, caoyuan, I am glad to find your blog and aiotrader. It is a very fine program, and I like it very much. I think it is a shining star in the open source trading/tech analysis. I am not a java program, but I know the potential and significance of your work,so I wish you can contact me when you see this. I have done quite a lot research work on trading systems. (see www.wsforex.com) I am sure we have common interests, and possibly we can develop some cooperations. best regards! pan cunwu

Add New Comment