我想從3遷移到3.1導軌 - 從3.0到3.1
助陣開源項目遷移,但我從來沒有遷移一個大的項目之前,所以我要尋找一些建議?
這是項目 - https://github.com/locomotivecms/engine
謝謝,亞歷克斯
我想從3遷移到3.1導軌 - 從3.0到3.1
助陣開源項目遷移,但我從來沒有遷移一個大的項目之前,所以我要尋找一些建議?
這是項目 - https://github.com/locomotivecms/engine
謝謝,亞歷克斯
這是一個 「幾乎工作」 locomotivecms代碼,遷移on Rails的3.1:
https://github.com/lgs/engine/tree/rails-3.1
...它沒有準備好拉請求,
事實上,它錯過了在所有的relati中替換/ images/whith/assets /五個路徑......,反正 它啓動和熬夜(儘管有許多 「棄用警告」),在軌道上3.1服務器:
[email protected]:~/rails/github/engine$ rails s
DEPRECATION WARNING: config.generators in Rails::Railtie is deprecated. Please use config.app_generators instead. (called from <top (required)> at /home/lsoave/rails/github/engine/config/application.rb:9)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/lsoave/rails/github/engine/config/application.rb:9)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/lsoave/rails/github/engine/config/application.rb:9)
=> Booting WEBrick
=> Rails 3.1.0.rc4 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2011-06-22 01:54:34] INFO WEBrick 1.3.1
[2011-06-22 01:54:34] INFO ruby 1.9.2 (2010-12-25) [i686-linux]
[2011-06-22 01:54:34] INFO WEBrick::HTTPServer#start: pid=2948 port=3000
Rails的控制檯正常工作,以及:
[email protected]:~/rails/github/engine$ rails c
DEPRECATION WARNING: config.generators in Rails::Railtie is deprecated. Please use config.app_generators instead. (called from <top (required)> at /home/lsoave/rails/github/engine/config/application.rb:9)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/lsoave/rails/github/engine/config/application.rb:9)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from <top (required)> at /home/lsoave/rails/github/engine/config/application.rb:9)
Loading development environment (Rails 3.1.0.rc4)
ruby-1.9.2-p136 :001 >
這是引導我跟着我嘗試在:
http://davidjrice.co.uk/2011/05/25/how-to-upgrade-a-rails-application-to-version-3-1-0.html
更新: 「不能到位修改SafeBuffer」 錯誤解決
UPDATE 11年6月23日: 解決 「引發ArgumentError(錯誤的參數數目(4 3))」 添加選項參數(第四),以set_session到LIB/locomotive/session_store.rb b/lib/locomotive/session_store.rb 感謝Nicholas Hubbard先前的回答。
從GitHub轉貼:
它看起來像在3.1的新會話需要4個PARAMS: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb線61
高清set_session(ENV,SID,session_data是,期權)
機車商店只需要三個: https://github.com/lgs/engine/blob/rails-3.1/lib/locomotive/session_store.rb第31行 def set_session(env,sid,session_data)
看起來正在傳遞的選項也是我們並不期待的。
感謝將set_session的選項添加到引擎本地文件lib/locomotive/session_store.rb中,它的工作原理! – 2011-06-23 21:07:14
...推送到https://github.com/lgs/engine/tree/rails-3.1 – 2011-06-23 21:08:36
警告:我仍然必須在所有相對路徑中替換/ images/whith/assets /,因此佈局仍然被破壞...如果有人想幫忙,請參閱教程http://davidjrice.co.uk/2011/05/25/how-to-upgrade-a-rails-application-to-version-3-1-0。html – 2011-06-23 21:16:58
查看最後三集http://railscasts.com/ – Mischa 2011-05-26 13:46:00
已經有了,無法確定是否有腳本來檢查代碼兼容性 – Alex 2011-05-26 14:45:27
有助於升級到Rails 3.1的資源:http://jasonrudolph.com/博客/ 2011/06/06/helpful-resources-for-upgrading-to-rails-3-1/ – 2011-06-24 09:56:19