Tag: ruby on rails 4

当我运行`bundle exec rake test:prepare`它出错了,但是`bundle exec rake db:test:prepare`会很好地发出警告。 这是怎么回事?

所以根据这个链接,一个是快捷包装器(所以我猜它们是相同的)。 当我运行bundle exec rake db:test:prepare ,我收到此错误: Don’t know how to build task ‘test:prepare’ /Users/aj/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/bin/ruby_executable_hooks:15:in `eval’ /Users/aj/.rvm/gems/ruby-2.0.0-p451@railstutorial_rails_4_0/bin/ruby_executable_hooks:15:in `’ …但是当我运行bundle exec rake db:test:prepare ,我收到此警告: WARNING: db:test:prepare is deprecated. The Rails test helper now maintains your test schema automatically, see the release notes for details. 任何人都可以阐明这一点吗?

使用Google Analytics进行Rails 4 turbolinks

我想知道在Rails 4中实施Google Analytics跟踪代码以及turbo链接的最佳方式是什么。普通代码段是否有效? 我也看过这个gem ,但我不确定它是做什么的。