-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMIGRATION_NOTES
102 lines (73 loc) · 3.3 KB
/
MIGRATION_NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
* (upgrade your app to Rails 2.3)
* use bundler in Rails 2.3 app to manage gems:
http://gembundler.com/rails23.html
* remove vendor/rails
rm vendor/rails
remove RAILS_GEM_VERSION from environment.rb
* update to latest Rails 2.3 version (2.3.12)
* update rails scripts
rake rails:update
* rake/rdoctask is deprecated. Use rdoc/task instead (in RDoc 2.4.2+)
in Gemfile:
gem "rdoc"
in Rakefile:
require 'rake/rdoctask' => require 'rdoc/task'
http://matthew.mceachen.us/blog/howto-fix-rake-rdoctask-is-deprecated-use-rdoc-task-instead-1169.html
* DEPRECATION WARNING: Kernel#returning has been deprecated in favor of Object#tap
returning(x) {} ===> x.tap {}
http://blog.rubybestpractices.com/posts/gregory/011-tap-that-hash.html
* (fix remaining issues and deprecation notes)
* fix output of rails migration plugin:
(rake rails:upgrade:check)
http://guides.rubyonrails.org/3_0_release_notes.html#upgrade-process
https://github.com/rails/rails_upgrade
Old router API
The router API has totally changed.
More information: http://yehudakatz.com/2009/12/26/the-rails-3-router-rack-it-up/
The culprits:
- config/routes.rb
Deprecated test_help path
You now must require 'rails/test_help' not just 'test_help'.
More information: http://weblog.rubyonrails.org/2009/9/1/gem-packaging-best-practices
The culprits:
- test/test_helper.rb.rails2
Deprecated ERb helper calls
Block helpers that use concat (e.g., form_for) should use <%= instead of <%. The current form will continue to work for now, but you will get deprecation warnings since this form will go away in the future.
More information: http://weblog.rubyonrails.org/
(applies to all helpers that take blocks, like javascript_tag ... do as well)
The culprits:
- app/views/flats/index.html.erb
- app/views/flats/edit.html.erb
- app/views/flats/new.html.erb
- app/views/flats/prefill_url_form.html.erb
named_scope is now just scope
The named_scope method has been renamed to just scope.
More information: http://github.com/rails/rails/commit/d60bb0a9e4be2ac0a9de9a69041a4ddc2e0cc914
The culprits:
- app/models/flat.rb
* rake rails:upgrade:backup
* "Note that Ruby 1.8.7 p248 and p249 have marshaling bugs that crash Rails 3.0."
=> upgrade to Ruby 1.9.2 or 1.8.7 p 302+
* change Rails gem version to 3.0.9
* rails .
=> merge files
* upgrade routes to rails 3 syntax
* undefined method `generate_best_match=' for ActionDispatch::Routing:Module
=> delete file as these are defaults in Rails 3.
* strings output in templates are now html escaped by default.
=> mark all strings that should not be escaped with .html_safe
* remove preinitializer
only needed in Rails 2.3 w bundler
* destroy geht nicht
=> link_to mit :confirm war verwendet, das UJS brauchte.
rails.js war nicht includiert; done, done.
* create geht nicht
No route matches "/flats/new"
=> Rails wollte POST auf den pfad machen, das geht nicht. umstellen auf get:
form_tag(url_for_options = {}, options = {}
=> form_tag({:action => 'new'}, {:method => :get})
* uninitialized class variable @@scraper_registry in PageScraper
=> needed to load special page scrapers by hand (initializer), since Rails does not look them up directly
and therefore const_missing doesn't kick in to autoload them.
---
* clean up script/*