سؤال

وأنا باستخدام الأحجار الكريمة الشياطين روبي لخلق الخفي مخصصة لمشروع سكك بلدي. المشكلة الوحيدة هي أنه عندما أحاول بدء الشياطين ruby lib/daemons/test_ctl start أنه فشل ولن تبدأ. ملف سجل له هذا الإخراج.

# Logfile created on Wed Oct 22 16:14:23 +0000 2008 by /  
*** below you find the most recent exception thrown, this will be likely (but not certainly) the exception that made the application exit abnormally \*\*\*  
# MissingSourceFile: no such file to load -- utf8proc_native  
*** below you find all exception objects found in memory, some of them may have been thrown in your application, others may just be in memory because they are standard exceptions ***  
# NoMemoryError: failed to allocate memory>  
# SystemStackError: stack level too deep>  
# fatal: exception reentered>  
# LoadError: no such file to load -- daemons>  
# LoadError: no such file to load -- active_support>  
# MissingSourceFile: no such file to load -- lib/string>  
# MissingSourceFile: no such file to load -- utf8proc_native>  

وحتى يحدث عندما تولد الخفي (من المساعد القضبان) ومحاولة لتشغيله. لا أحد يعرف كيفية إصلاح هذه المشكلة؟

هل كانت مفيدة؟

المحلول

حسنا، أنا فعلا وجدت الحل لهذه المشكلة. أحتاج اثنين من الملفات المخصصة في config/environment.rb. I استخدام أسماء المسار النسبي ولأن يتم تنفيذ الشياطين في القضبان الدليل الرئيسي أنه تعذر العثور على هذين الملفين. بعد جعلها المسار المطلق أنها ثابتة المشكلة.

نصائح أخرى

ولقد قضى 30 دقيقة في محاولة لحل خطأ مماثل عندما تحاول الحصول على الشياطين المساعد العمل:

LoadError: no such file to load -- active_support

لسبب ما، لم يكن العثور على active_support ليب، حتى ولو تم تثبيته. (ربما بسبب وجود لي القضبان المجمدة).
في حالتي، كان الحل لهذا لاستخدام المسار المطلق لactive_support في بلدي
ملف CTL (مثل lib/daemons/mailer_ctl).

وكنت بحاجة إلى تغيير خط 5 من:

   require 'active_support'

إلى

 require './vendor/rails/activesupport/lib/active_support.rb'
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top