Rails - миграция с 3.0 на 3.1 - PullRequest
0 голосов
/ 26 мая 2011

Я хотел помочь проекту с открытым исходным кодом, перейдя с 3 на 3.1

Но мне никогда не приходилось переносить большой проект раньше, поэтому я ищу какой-нибудь совет?

этоэто проект - https://github.com/locomotivecms/engine

Спасибо, Алекс

Ответы [ 2 ]

1 голос
/ 23 июня 2011

Репосты с GitHub:

Похоже, что для новых сессий в 3.1 требуется 4 параметра: https://github.com/rails/rails/blob/master/actionpack/lib/action_dispatch/middleware/session/cookie_store.rb Строка 61

def set_session (env, sid, session_data, options)

В магазине в Локомотиве только три: https://github.com/lgs/engine/blob/rails-3.1/lib/locomotive/session_store.rb Строка 31 def set_session (env, sid, session_data)

Похоже, что варианты также передаются, чего мы не ожидаем.

1 голос
/ 22 июня 2011

здесь это «почти рабочий» код locomotivecms, перенесенный на рельсы 3.1:

https://github.com/lgs/engine/tree/rails-3.1

... он не готов к запросу на вытягивание,

фактически он пропустит замену / images / whith / assets / по всему относительному пути ..., в любом случае, он запускается и остается включенным (несмотря на множество предупреждений об устаревании) на сервере rails 3.1:

lsoave@ubuntu:~/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 также отлично работает:

lsoave@ubuntu:~/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 > 

Это руководство, которому я следовал во время попытки:

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...