ปัญหาการใช้ Cafe grader ที่พบบ่อย/กรุ

จาก Theory Wiki
ไปยังการนำทาง ไปยังการค้นหา

ปัญหาจากการสั่ง sudo rake gems:install ใน script

WARNING: 'require 'rake/rdoctask is deprecated. Please use 'require 'rdoc/task' (in RDoc 2.4.2+)' instead

เกิดจาก rake ถ้า downgrade เป็น 0.8.3 warning จะหาย (เปลี่ยนจาก sudo apt-get install rake เป็น sudo gem install rake --version=0.8.3) แต่ดูจาก solution อื่นๆแล้ว เหมือนว่าการทำอย่างนี้เป็นแค่การซ่อน warning ? อันนี้ผมไม่รู้เหมือนกัน

http://stackoverflow.com/questions/7993162/i-have-still-rake-rdoctask-deprecated-warning

  • ผมลองติดดูโดยไม่ได้ downgrade rake ก็พบว่าลงได้ตามปกติครับ = ="

Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError)

ใส่ require 'thread' ก่อนบรรทัด require File.join(File.dirname(__FILE__), 'boot') ในไฟล์ Rakefile, script/server, config/environment.rb

http://stackoverflow.com/questions/5176782/uninitialized-constant-activesupportdependenciesmutex-nameerror

rake aborted! undefined method `name' for "actionmailer":String

เกิดจาก rubygems ถ้า downgrade เป็น 1.6.2 จะไม่มีปัญหา (sudo gem install rubygems-update -v 1.6.2 && sudo update_rubygems) การ downgrade rubygems ทำให้ gem ที่เคยลงมาหายหมด

http://www.redmine.org/issues/8325

หลังจากลง rails ใหม่ คราวนี้ก็เรียบร้อยไม่พบปัญหาอะไรอีกครับ

ปัญหาอื่นๆ

ไม่สามารถ start grader in grading env ได้

อาจเป็นเพราะปัญหา Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) จากไฟล์ cafe_grader/judge/scripts/config/environment.rb วิธีแก้ก็เหมือนกันเลยคือใส่ require 'thread'

error during grading

หากเครื่องที่ลงเป็น linux 64 bit จะไม่สามารถ compile box.cc ได้ (compilation error) ซึ่งต้องใช้ box64.cc แทน สามารถทำได้โดยสั่ง mv cafe_grader/judge/scripts/std-script/box.cc cafe_grader/judge/scripts/std-script/box32.cc mv cafe_grader/judge/scripts/std-script/box64.cc cafe_grader/judge/scripts/std-script/box.cc