Questions tagged «ruby-on-rails-4.1»

9
Rails 4-Gem :: LoadError:为数据库适配器指定了“ mysql2”,但未加载gem
在我的gemfile中,我有: gem 'mysql2' 我的database.yml如下: default: &default adapter: mysql2 database: <%= ENV['db_name'] %> username: <%= ENV['db_user'] %> password: <%= ENV['db_pass'] %> host: <%= ENV['db_host'] %> pool: 32 socket: <%= ENV['socket'] %> development: <<: *default production: <<: *default 我都运行了bundle update,bundle install并且我的Gemfile.lock显示mysql2。 但是,当我运行时,我rake db:migrate在计算机和登台服务器上都收到了此消息: myproject.com(master)$ rake db:migrate WARNING: Use strings for Figaro configuration. …

24
无法解码下载的字体,OTS解析错误:无效的版本标记+ rails 4
我正在做资产的预编译,并在生产模式下运行该应用程序。编译后,当我加载索引页面时,我在chrome控制台中收到以下警告: Failed to decode downloaded font: http://localhost:3000/fonts/ionicons.ttf?v=2.0.0 prospects:1 OTS parsing error: invalid version tag Failed to decode downloaded font: http://localhost:3000/fonts/ionicons.woff?v=2.0.0 prospects:1 OTS parsing error: invalid version tag 问题是它没有加载图标,而不是显示正方形。 我们使用了自定义字体,代码为: @font-face { font-family: 'icomoon'; src: font-url('icomoon.eot'); src: font-url('icomoon.eot?#iefix') format('embedded-opentype'), font-url('icomoon.ttf') format('truetype'), font-url('icomoon.woff') format('woff'), font-url('icomoon.svg#icomoon') format('svg'); font-weight: normal; font-style: normal; } 我不知道我到底缺少什么。我进行了很多搜索并尝试了解决方案,但没有成功。
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.