1
我想的是定製文件夾添加到資產的路徑:試圖自定義文件夾添加到資產路徑
module MyApp
class Application < Rails::Application
config.assets.paths << Rails.root.join("something....")
# ....
config.assets.paths << Rails.root.join("app", "my_folder1", "fonts")
我重新啓動我的應用程序,當直接去http://localhost:3000/my_folder1/fonts/my_font1.ttf
或http://localhost:3000/my_folder1/my_font1.ttf
在瀏覽器,我得到了error 404
。爲什麼?如何解決它?請注意, 故意在文件夾「my_folder1」中。
你有什麼推薦的移動資產?一個單獨的文件夾「my_rails_project/app/mobile_assets」與正常的「資產」具有相同的結構嗎? – Johshi