我的网页设计师为我提供了已添加到字体真棒的更新字体/图标 - 他将其放在本地字体文件夹中.我还获得了一个font-awesome.css文件.
我直接将fonts文件夹复制到我的资产中,并将font-awesome.css放在assets/stylesheets中.
我的代码中正确引用了css,但是没有加载字体文件夹中的任何图标.
我需要做些什么才能确保所有内容都正确加载和/或引用了fonts文件夹?
我没有在一周内触及我的代码,但是当我捆绑,然后尝试运行我的网络服务器时,我现在得到以下错误,这让我死在水中.包含错误输出中建议的设计加密gem不能解决问题,仍然会导致相同的错误.任何帮助是极大的赞赏.
[DEVISE] Devise.apply_schema is deprecated and has no effect. Please remove it.
[DEVISE] To select a encryption which isn't bcrypt, you should use devise-encryp
table gem.
[DEVISE] Devise.use_salt_as_remember_token is deprecated and has no effect. Plea
se remove it.
/Users/sa/.rvm/gems/ruby-1.9.2-p290/gems/actionpack-3.2.1/lib/action_d
ispatch/http/mime_type.rb:101: warning: already initialized constant PDF
[DEVISE] You're trying to include :encryptable in your model but it is not bundl
ed with the Devise gem anymore. Please add `devise-encryptable` to your Gemfile
to proceed.
/Users/sa/.rvm/gems/ruby-1.9.2-p290/gems/devise-2.1.0/lib/devise/model
s.rb:96:in `const_get': uninitialized constant Devise::Models::Encryptable (Name …Run Code Online (Sandbox Code Playgroud) 在上传到新目的地之前,我使用 Tempfile 来存储生成的 PDF。
pdf_file = WickedPdf.new.pdf_from_string(msgbody)
tempfile = Tempfile.new(['Bob', '.pdf'], Rails.root.join('public','pdf-test'))
tempfile.binmode
tempfile.write pdf_file
tempfile.close
Run Code Online (Sandbox Code Playgroud)
虽然这工作正常,但生成的文件名,例如 bob20140331-19260-1g6rzr1.pdf 对用户不友好。
我知道 Tempfile 创建了一个唯一的名称以及原因,但我最终需要更改名称以使其更直观/更容易为我的用户消化。
有推荐的方法吗?即使它只是简单地删除中间(19260)?感谢您的时间和帮助。