レール 3.2.12
ルビー1.9.3
レッドマイン 2.2.3
セントス 6.3
私は Rails の専門家ではありませんが、Redmine をアップグレードするタスクを与えられました。http://www.redmine.org/
Redmine は簡単でしたが、プラグインは非常に難しいです。とりわけ、このプラグインをインストールするように求められました:
https://github.com/reubenmallaby/redmine_embedded
私はこれを正しくインストールしたと思いました。管理者として Redmine にログインすると、モジュールが表示され、次のフォームが表示されます。
<form accept-charset="UTF-8" action="/projects/timeout/embedded/upload" enctype="multipart/form-data" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓" /><input name="authenticity_token" type="hidden" value="LjMzA63/L+G8Uj/1/uFefLYMJ1MxOTdTB516XTS6rjE=" /></div> <fieldset id="embedded_doc" class="collapsible collapsed">
<legend onclick="toggleFieldset(this);">Upload documentation</legend>
<div style="display: none;">
Select File (ZIP format only, root must be html directory):
<input id="upload_datafile" name="upload[datafile]" type="file" />
<input name="commit" type="submit" value="Upload" />
</div>
</fieldset>
</form>
プラグインの構成で、アップロードフォルダーを次のように設定しました。
/home/cehovice/redmine-2.2/public/uploads/{PROJECT}/html
アップロードフォルダーで chmod 0777 を実行しました。
HTML ファイルをアップロードしようとしましたが、何もアップロードされません。
Phusion Passenger Standalone の端末出力を見ると、次のように表示されます。
Started POST "/projects/men_of_fashion/embedded/upload" for 10.0.1.53 at 2013-02-13 15:11:02 -0500
Processing by RedmineEmbeddedController#upload as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"LjMzA63/L+G8Uj/1/uFefLYMJ1MxOTdTB516XTS6rjE=", "upload"=>{"datafile"=>#<ActionDispatch::Http::UploadedFile:0x00000006f54708 @original_filename="tositeconfig.html", @content_type="text/html", @headers="Content-Disposition: form-data; name=\"upload[datafile]\"; filename=\"tositeconfig.html\"\r\nContent-Type: text/html\r\n", @tempfile=#<File:/tmp/RackMultipart20130213-26288-1r4gu37>>}, "commit"=>"Upload", "id"=>"men_of_fashion"}
(1.2ms) SELECT MAX(`settings`.`updated_on`) AS max_id FROM `settings`
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND `users`.`id` = 176 AND (users.status = 1) LIMIT 1
Current user: cehovice (id=176)
Project Load (0.9ms) SELECT `projects`.* FROM `projects` WHERE `projects`.`identifier` = 'men_of_fashion' LIMIT 1
EnabledModule Load (0.3ms) SELECT name FROM `enabled_modules` WHERE `enabled_modules`.`project_id` = 1
Rendered plugins/redmine_embedded/app/views/redmine_embedded/_upload.html.erb (6.5ms)
Rendered plugins/redmine_embedded/app/views/redmine_embedded/index.html.erb within layouts/base (7.8ms)
UserPreference Load (0.4ms) SELECT `user_preferences`.* FROM `user_preferences` WHERE `user_preferences`.`user_id` = 176 LIMIT 1
SQL (1.3ms) SELECT `members`.`id` AS t0_r0, `members`.`user_id` AS t0_r1, `members`.`project_id` AS t0_r2, `members`.`created_on` AS t0_r3, `members`.`mail_notification` AS t0_r4, `projects`.`id` AS t1_r0, `projects`.`name` AS t1_r1, `projects`.`description` AS t1_r2, `projects`.`homepage` AS t1_r3, `projects`.`is_public` AS t1_r4, `projects`.`parent_id` AS t1_r5, `projects`.`created_on` AS t1_r6, `projects`.`updated_on` AS t1_r7, `projects`.`identifier` AS t1_r8, `projects`.`status` AS t1_r9, `projects`.`lft` AS t1_r10, `projects`.`rgt` AS t1_r11, `roles`.`id` AS t2_r0, `roles`.`name` AS t2_r1, `roles`.`position` AS t2_r2, `roles`.`assignable` AS t2_r3, `roles`.`builtin` AS t2_r4, `roles`.`permissions` AS t2_r5, `roles`.`issues_visibility` AS t2_r6 FROM `members` LEFT OUTER JOIN `projects` ON `projects`.`id` = `members`.`project_id` LEFT OUTER JOIN `member_roles` ON `member_roles`.`member_id` = `members`.`id` LEFT OUTER JOIN `roles` ON `roles`.`id` = `member_roles`.`role_id` WHERE `members`.`user_id` = 176 AND (projects.status<>9) ORDER BY projects.name
(0.5ms) SELECT COUNT(DISTINCT `versions`.`id`) FROM `versions` LEFT OUTER JOIN `projects` ON `projects`.`id` = `versions`.`project_id` WHERE (projects.id = 1 OR (projects.status <> 9 AND ( versions.sharing = 'system' OR (projects.lft >= 99 AND projects.rgt <= 132 AND versions.sharing = 'tree') OR (projects.lft < 99 AND projects.rgt > 132 AND versions.sharing IN ('hierarchy', 'descendants')) OR (projects.lft > 99 AND projects.rgt < 132 AND versions.sharing = 'hierarchy'))))
Tracker Load (0.1ms) SELECT `trackers`.* FROM `trackers` WHERE `trackers`.`id` IN (2)
IssuePriority Load (0.2ms) SELECT `enumerations`.* FROM `enumerations` WHERE `enumerations`.`type` IN ('IssuePriority') AND `enumerations`.`is_default` = 1 ORDER BY enumerations.position ASC LIMIT 1
(0.2ms) select version from schema_migrations where version like '%-redmine_backlogs'
CACHE (0.0ms) SELECT `trackers`.* FROM `trackers` WHERE `trackers`.`id` IN (2)
CACHE (0.0ms) SELECT `enumerations`.* FROM `enumerations` WHERE `enumerations`.`type` IN ('IssuePriority') AND `enumerations`.`is_default` = 1 ORDER BY enumerations.position ASC LIMIT 1
(0.3ms) select version from schema_migrations where version like '%-redmine_backlogs'
Wiki Load (0.3ms) SELECT `wikis`.* FROM `wikis` WHERE `wikis`.`project_id` = 1 LIMIT 1
(0.2ms) SELECT COUNT(*) FROM `boards` WHERE `boards`.`project_id` = 1
Repository Load (2.7ms) SELECT `repositories`.* FROM `repositories` WHERE `repositories`.`project_id` = 1 AND (is_default = 1) LIMIT 1
Completed 200 OK in 221ms (Views: 192.1ms | ActiveRecord: 9.8ms)
これ:
宝石環境
私を取得します:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.25
- RUBY VERSION: 1.9.3 (2013-02-06 patchlevel 385) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-1.9.3-p385
- RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-1.9.3-p385/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-1.9.3-p385/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/rvm/gems/ruby-1.9.3-p385
- /usr/local/rvm/gems/ruby-1.9.3-p385@global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://rubygems.org/
ログ/本番ではエラーはありません。
アップデート:
zipファイルをアップロードできました。しかし、それ自体は解凍しません。github でプロジェクトにチケットを提出します。