Yerel bilgisayarda mükemmel şekilde çalışan raylar uygulamasına sahibim. Ben Heroku üzerine dağıtma olduğumda Ama tarayıcıda sonraki hata alıyorum:Kaynak yüklenemedi: sunucu 404 (Bulunamadı) durumuyla yanıt verdi
Failed to load resource: the server responded with a status of 404 (Not Found) http://hollow-cloud-nnn.herokuapp.com/stylesheets/application.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://hollow-cloud-nnn.herokuapp.com/javascripts/application.js
Ben \ klasörü stil sayfaları javascript ve \ app \ varlıkların \ app \ varlıklarda bu dosyaları var. İşte
benim yapılandırma \ production.rb geçerli: İşte# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = true
# Generate digests for assets URLs
config.assets.digest = true
dağıtım konsol çıktısı:
Using mongoid (2.4.7)
Using rails (3.2.1)
Using sass (3.1.15)
Using sass-rails (3.2.5)
Using uglifier (1.2.3)
Your bundle is complete! It was installed into ./vendor/bundle
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
-----> Rails plugin injection
Injecting rails_log_stdout
Injecting rails3_serve_static_assets
-----> Discovering process types
Procfile declares types -> (none)
Default types for Ruby/Rails -> console, rake, web, worker
-----> Compiled slug size is 15.8MB
-----> Launching... done, v24
http://hollow-cloud-7412.herokuapp.com deployed to Heroku
To [email protected]:hollow-cloud-7412.git
cb8ded3..dc103ac master -> master
bunu nasıl düzeltebilirim?
bunu düzeltmek için çalışıyordu aşağıdaki satırı eklemek için talimat gibi bu Mongoid kullanıcılar için oldukça yaygın bir sorundur ama başarı yoktu. Daha fazla bilgi vermek için sorumu güncelledim. – demas
Doğru mu, bu raylar '... herokuapp.com/stylesheets/application.css' klasöründeki dosyaları arıyor mu? ('Public' klasörü eksik. – demas
Uygulamayı yeniden başlatmayı denediniz mi? Canlı derleme sırasında '/ public/assets' klasöründe dosyalar oluşturacaktır. – NARKOZ