ROR uygulamalarını Capistrano ile dağıtırken sorun yaşıyorum. Bu başvurum yığını:Rails On Rails Dağıtma Hatası Capistrano ile Uygulamalar (Mongoid)
- Çerçevesi: Ruby on Rails
- Veritabanı: Puma
- Web Sunucusu: Nginx
Berfore ben
require 'mongoid'
Mongoid.load!(File.expand_path('mongoid.yml', './config'))
bu kodla mongoid.yml yüklemek zorunda
Mongoid::Errors::NoEnvironment:
Problem:
Could not load the configuration since no environment was defined.
Summary:
Mongoid attempted to find the appropriate environment but no Rails.env, Sinatra::Base.environment, RACK_ENV, or MONGOID_ENV could be found.
Resolution:
Make sure some environment is set from the mentioned options. Mongoid cannot load configuration from the yaml without knowing which environment it is in, and we have considered defaulting to development an undesireable side effect of this not being defined.
Ve
require 'mongoid'
Mongoid.load!(File.expand_path('mongoid.yml', './config'), :production)
bu kodu değiştirmeye çalışıyorum Ve yine de aynı hata çıkıyor. Bana kimse yardım edebilir mi? Teşekkürler :)
'u beğenmediyseniz, çok yavaş yanıt verdiğimiz için özür dileriz, ancak çözümünüz çalışmıyor. Sizi rahatsız ettiğim için üzgünüm. – filosofikode