Amazon

2013年9月14日土曜日

redmine1.4から2.3へのアップグレードに失敗、かと思ったら成功

最新版のインストール

最新版をダウンロードします。
# pwd
/usr/local/lib
# svn co http://svn.redmine.org/redmine/branches/2.3-stable

ライブラリの更新

必要なパッケージのインストール

$ sudo apt-get install libxslt1-dev

bundle installの実行

# bundle install

データベースのアップグレード

# RAILS_ENV="production" rake db:migrate
# rake generate_secret_token
# rake tmp:cache:clear
# rake tmp:sessions:clear

動作確認

# ruby script/rails server webrick -e production
=> Booting WEBrick
=> Rails 3.2.13 application starting in production on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2013-09-14 21:13:12] INFO  WEBrick 1.3.1
[2013-09-14 21:13:12] INFO  ruby 1.9.3 (2012-04-20) [x86_64-linux]
[2013-09-14 21:13:12] INFO  WEBrick::HTTPServer#start: pid=9870 port=3000
Started GET "/" for 192.168.1.10 at 2013-09-14 21:13:24 +0900
Processing by WelcomeController#index as HTML
  Current user: anonymous
Redirected to http://192.168.1.14:3000/login?back_url=http%3A%2F%2F192.168.1.14%3A3000%2F
Filter chain halted as :check_if_login_required rendered or redirected
Completed 302 Found in 127ms (ActiveRecord: 5.4ms)
Started GET "/" for 192.168.1.10 at 2013-09-14 21:13:24 +0900
Processing by WelcomeController#index as HTML
  Current user: anonymous
Redirected to http://192.168.1.14:3000/login?back_url=http%3A%2F%2F192.168.1.14%3A3000%2F
Filter chain halted as :check_if_login_required rendered or redirected
Completed 302 Found in 3ms (ActiveRecord: 0.2ms)
Started GET "/login?back_url=http%3A%2F%2F192.168.1.14%3A3000%2F" for 192.168.1.10 at 2013-09
-14 21:13:24 +0900
Processing by AccountController#login as HTML
  Parameters: {"back_url"=>"http://192.168.1.14:3000/"}
  Current user: anonymous
  Rendered account/login.html.erb within layouts/base (355.8ms)
Completed 500 Internal Server Error in 485ms

ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8):
    9: <%= favicon %>
    10: <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %>
    11: <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
    12: <%= javascript_heads %>
    13: <%= heads_for_theme %>
    14: <%= call_hook :view_layouts_base_html_head %>
    15: 
  app/views/layouts/base.html.erb:12:in `_app_views_layouts_base_html_erb___4289541992108074830_28530980'


Started GET "/login?back_url=http%3A%2F%2F192.168.1.14%3A3000%2F" for 192.168.1.10 at 2013-09-14 21:13:25 +0900
Processing by AccountController#login as HTML
  Parameters: {"back_url"=>"http://192.168.1.14:3000/"}
  Current user: anonymous
  Rendered account/login.html.erb within layouts/base (1.4ms)
Completed 500 Internal Server Error in 6ms

ActionView::Template::Error (incompatible character encodings: ASCII-8BIT and UTF-8):
    9: <%= favicon %>
    10: <%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %>
    11: <%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
    12: <%= javascript_heads %>
    13: <%= heads_for_theme %>
    14: <%= call_hook :view_layouts_base_html_head %>
    15: 
  app/views/layouts/base.html.erb:12:in `_app_views_layouts_base_html_erb___4289541992108074830_28530980'
下記に同じような現象がありましたが、パッチ当てても改善せず http://www.redmine.org/issues/13520

解決

database.ymlのadapterをmysqlからmysql2に変更することで問題なく動くようになりました。
production:
  adapter: mysql2

0 件のコメント: