• #1 楼 @sensi 执行过,BOOTSTRAP 很多 css 都无法显示,我是直接下载 bs 放在 assets 里面的,运行 rails s 是好的,运行 rails s -e production 就不行了,感觉一个 css 把布局都弄乱了

  • #1 楼 @king1990_cool 我安装用是 root deploy 用的也是 root 之前也觉得是角色问题,后来用 root 用户 restart ngnix 还是这样

  • 没有 rails=-=

  • 支持!新手过去学习

  • 希望尽快更新后续章节

  • 感谢

  • 21

  • 我是直接下载 git 上源码,现在执行了 bundle install --path vendor/bundle 查到的有关资料是这样的:

    这样项目依赖的 gem 既不是安装在系统目录,也不是用户目录,而是当前目录的 vendor/bundle 文件夹内。这样安装的 gem 每个项目独立,要清除项目的时候只要把整个项目目录删除就好了。(注意设置 git 忽略这个目录)

    部署环境同理,也是安装到 vendor/bundle 目录:

    bundle install --deployment 所以,一般情况把 Bundler 装到系统目录就够了,应用依赖装到应用目录中。关于 Bundler 的用法这里不再展开,可以查看官方网站:http://bundler.io/

  • 我从 git 上把完成的版本的 user_pages.spec.rb 覆盖后再执行出现:

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.6/lib/nokogiri.rb:27:in require': cannot load such file -- nokogiri/nokogiri (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0/gems/nokogiri-1.5.6/lib/nokogiri.rb:27:in' from /Users/qianyuhui/.bundler/ruby/2.0.0/capybara-d73c24d3e3fb/lib/capybara.rb:2:in require' from /Users/qianyuhui/.bundler/ruby/2.0.0/capybara-d73c24d3e3fb/lib/capybara.rb:2:in' from /Library/Ruby/Gems/2.0.0/gems/bundler-1.7.2/lib/bundler/runtime.rb:76:in require' from /Library/Ruby/Gems/2.0.0/gems/bundler-1.7.2/lib/bundler/runtime.rb:76:inblock (2 levels) in require' from /Library/Ruby/Gems/2.0.0/gems/bundler-1.7.2/lib/bundler/runtime.rb:72:in each' from /Library/Ruby/Gems/2.0.0/gems/bundler-1.7.2/lib/bundler/runtime.rb:72:inblock in require' from /Library/Ruby/Gems/2.0.0/gems/bundler-1.7.2/lib/bundler/runtime.rb:61:in each' from /Library/Ruby/Gems/2.0.0/gems/bundler-1.7.2/lib/bundler/runtime.rb:61:inrequire' from /Library/Ruby/Gems/2.0.0/gems/bundler-1.7.2/lib/bundler.rb:133:in require' from /Users/qianyuhui/Desktop/ruby/rails/sample_app_rails_4-modeling-users/config/application.rb:11:in' from /Users/qianyuhui/Desktop/ruby/rails/sample_app_rails_4-modeling-users/config/environment.rb:2:in require' from /Users/qianyuhui/Desktop/ruby/rails/sample_app_rails_4-modeling-users/config/environment.rb:2:in' from /Users/qianyuhui/Desktop/ruby/rails/sample_app_rails_4-modeling-users/spec/spec_helper.rb:6:in require' from /Users/qianyuhui/Desktop/ruby/rails/sample_app_rails_4-modeling-users/spec/spec_helper.rb:6:inblock in ' from /Library/Ruby/Gems/2.0.0/gems/spork-1.0.0rc3/lib/spork.rb:24:in prefork' from /Users/qianyuhui/Desktop/ruby/rails/sample_app_rails_4-modeling-users/spec/spec_helper.rb:4:in' from /Users/qianyuhui/Desktop/ruby/rails/sample_app_rails_4-modeling-users/spec/requests/user_pages_spec.rb:1:in require' from /Users/qianyuhui/Desktop/ruby/rails/sample_app_rails_4-modeling-users/spec/requests/user_pages_spec.rb:1:in' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.13.0/lib/rspec/core/configuration.rb:819:in load' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.13.0/lib/rspec/core/configuration.rb:819:inblock in load_spec_files' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.13.0/lib/rspec/core/configuration.rb:819:in each' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.13.0/lib/rspec/core/configuration.rb:819:inload_spec_files' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.13.0/lib/rspec/core/command_line.rb:22:in run' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.13.0/lib/rspec/core/runner.rb:77:inrescue in run' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.13.0/lib/rspec/core/runner.rb:73:in run' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.13.0/lib/rspec/core/runner.rb:17:inblock in autorun'

    nokogiri-1.5.6/lib/nokogiri.rb

    这个问题我之前也出现过。。。请问是什么原因?

  • %>_<%都是复制粘贴的。。。我再看看跟 pdf 里是不是有差。。。

  • 我是新手。。现在不怎么清楚测试的意义。。之前写 php 都是直接看结果。。现在看 railstutotial 看到中间部分,感觉测试代码写了很多。。。如果我是想按照自己想法做一个应用,测试是不是必须的?

  • 已购买指南 还有 tutorial 两本,测试的需要买么?

  • 我是来给大伙送航拍器的 at 2014年08月23日

    做的一手好广告

  • 蛮喜欢这款的界面 -0- 能不能拖走?