开浏览器调试,看看有读取 font-awesome 相关的 css 没,再看看内容,正不正常。
If you use Rails/Sprockets, add this to e.g. application.css.scss:
*= require font-awesome
这个做了没。
但配置了好久都不成功
怎么不成功法
每个语言都有它的惯用法,多参考开源软件的源码。
有必要一定要用 nested_attributes 实现吗?
foo = Foo.create params[:foo]
params[:foo][:aliases].each { |alias_params| foo.aliases.find_or_create_by(alias_params) }
:name
的值就是 :name
,我一开始都没想那么多。
Note: The Multi-User install instructions must be prefixed with the 'sudo' command. However, once the install is complete, and the instructions to add users to the rvm group is followed, the use of either sudo or rvmsudo is no longer required. The 'sudo' command is only to temporarily elevate privileges so the installer can complete it's work. If you need to use 'sudo' or 'rvmsudo' after the install is complete, some part of the install directions were not properly followed. This usually is because people execute the install as root, rather than executing the installation instructions from a non-privileged user account.
这里说用 sudo 安装跟用 root 安装还不一样,root 会导致一些问题。
正常 multi-user 模式是普通用户用 sudo 安装,然后将用户加到 rvm 组,之后不需要 sudo 或 rvmsudo。
我建议是用 single-user 模式。
#17 楼 @shangrenzhidao 用 root 安装不是装在 root 下,而是装成 multi-user 模式。我现在都用 single-user 模式了,记不太清楚要怎么弄。
root 是个特殊的用户,如果搞不清楚的话还是不要用,不过你可以趁机搞明白 root 和 sudo 跟 Linux 用户权限的问题。
Multi-User:
The rvm function will be automatically configured for every user on the system if you install with sudo. This is accomplished by loading /etc/profile.d/rvm.sh on login. Most Linux distributions default to parsing /etc/profile which contains the logic to load all files residing in the /etc/profile.d/ directory. Once you have added the users you want to be able to use RVM to the rvm group, those users MUST log out and back in to gain rvm group membership because group memberships are only evaluated by the operating system at initial login time.
#6 楼 @davidminaki 这更难理解了。
_, date, urlname, _ = *filename.match(/\A#{tmp_path}\/_posts\/(\d+-\d+-\d+)-(.+)(\.[^.]+)\z/)
解析 jekyll post 的文件名。
https://github.com/ruby-china/ruby-china/issues
打开浏览器调试工具,看看提交的时候有没有错误。
测试
Agile Web Development with Rails 4 http://pragprog.com/book/rails4/agile-web-development-with-rails-4
#2 楼 @small_fish__ 我以前也觉得是两个东西。
用 Jekyll
编辑插 <hr>
元素然后程序处理。
#12 楼 @shangrenzhidao 不客气
#10 楼 @shangrenzhidao 在 host 机编辑,在虚拟机装组件。目录同步,哪边工具方便用哪边。
config.vm.network "public_network", ip: "x.x.x.x"
#2 楼 @shangrenzhidao 如果你的 host 主机有两个网络接口就需要指定 bridge,你的 host 主机有两个网络接口吗?