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>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值