我也是 phantomjs 2.1.1,我会报这个错,虽然可以加page.driver.browser.js_errors = false
,单感觉这办法不好。
Error:
NewProductTest#test_create_a_new_product:
Capybara::Poltergeist::JavascriptError: One or more errors were raised in the Javascript code on the page. If you don't care about these errors, you can ignore them by setting js_errors: false in your Poltergeist configuration (see documentation for details).
TypeError: undefined is not an object (evaluating 'handler.call')
TypeError: undefined is not an object (evaluating 'handler.call')
at http://127.0.0.1:52934/assets/application-98eeb46022232c75bc6d2971073ca25d12383cefe13cc520805de10f77a13424.js:145
at :0 in sendEvent
at phantomjs://code/web_page.js:59
at phantomjs://code/web_page.js:558 in mouseEvent
at phantomjs://code/node.js:67 in mouseEvent
at phantomjs://code/browser.js:398 in mouse_event
at phantomjs://code/browser.js:418 in click
at phantomjs://code/browser.js:89 in runCommand
at phantomjs://code/cmd.js:35 in run
at phantomjs://code/main.js:17 in runCommand
at phantomjs://code/connection.js:16 in commandReceived
at phantomjs://code/connection.js:1
TypeError: undefined is not an object (evaluating 'handler.call')
TypeError: undefined is not an object (evaluating 'handler.call')
at http://127.0.0.1:52934/assets/application-98eeb46022232c75bc6d2971073ca25d12383cefe13cc520805de10f77a13424.js:145
at :0 in sendEvent
at phantomjs://code/web_page.js:59
at phantomjs://code/web_page.js:558 in mouseEvent
at phantomjs://code/node.js:67 in mouseEvent
at phantomjs://code/browser.js:398 in mouse_event
at phantomjs://code/browser.js:418 in click
at phantomjs://code/browser.js:89 in runCommand
at phantomjs://code/cmd.js:35 in run
at phantomjs://code/main.js:17 in runCommand
at phantomjs://code/connection.js:16 in commandReceived
at phantomjs://code/connection.js:1
test/integration/new_product_test.rb:12:in `block in <class:NewProductTest>'
这 gem 怎么用?
capistrano3-puma 从 2 到 3 是个大版本升级,当然需要看一下Usage,如果看一下的话,其实这个问题根本就不应该说是诡异异常。
把 gem 文件 clone 到本地,然后在用到的 Gemfile 中直接引用即可。
# $ bundle config --local local.wechat /Users/guochunzhong/git/oss/wechat
gem 'wechat', git: 'https://github.com/Eric-Guo/wechat', branch: :master
如果要 autoloading 这个 gem,在 development.rb 中启用:
config.autoload_paths += Dir["#{config.root}/../oss/wechat/lib/**/"]
这个方法比直接引用 path 好的地方在于,不影响 deploy。
求问怎么样才能认识半年吃一次饭,一次给 200 万的朋友。
app 目录下任何修改都不用,其他目录都需要,config 目录,除了 routes.rb 以外的任何文件。(假设用默认设置)
同意楼上,并且删掉.rvm 后别用 rvm 了,通过brew install ruby
装吧,你只要一个版本的话,还是用 brew 方便。
主要是这段,我也准备在wechat gem上支持一下,一直没时间。。
我没有使用过 gemsrc,不过我愿意来说说我目前的工作流,首先如果只是看一眼源吗,bundler open wechat
,如果还准备调试或者给 gem 加功能,肯定直接 clone 最新版,然后在 Gemfile 里面引用,并直接使用 clone 的版本:
# $ bundle config --local local.wechat /Users/guochunzhong/git/oss/wechat/
gem 'wechat', git: 'https://github.com/Eric-Guo/wechat.git', branch: :master
这样改完测完后就可以直接提 PR 了,还算方便。
没了,总结的很好。硬说还有的话,可能就是想那么多,还是只用 has_many 简单一些吧。。
这个应该是 asset_host/图像 CDN 配置的有问题吧。。要慢慢看了。
第二个问题(ElasticSearch 建 index 报错),其实也有一个PR讨论过了。。
第一个问题(pages 表)其实我已经在一周前提了PR。。
搭🚖提问,您觉得在 2017 年 3 月,入门 MVC 框架,vue.js 是否是一个比 React / Ember 更好的选择(排除爱国因素,因为我知道考虑爱国因素,就不用问了。。)
我感觉我不需要 Docker。。。在本地开发是我一直倾向于原生(Rails 直接跑在 Windows/MacOS 上),发布时我更倾向于选择可以快速发布的工具(Docker 发布比 Capistrano 慢),跑生产时我倾向于便宜(Docker 好像还是比 VPS 贵)。
虽然我这样说会很打击 Docker,但我觉得 Go 是一门好语言,因为平均工资高。。。
我觉得没用过 has_and_belongs_to_many 的开发者一定是名门正派,开发习惯良好的大厂出来的。。
要不还是开个微信开发的节点?我看死的差不多的 RubyMotion 也有节点啊。。
定义了一个环境变量 VERSION 标记应用的版本,然后跑rails db:migrate
,数据库升级到跑路。。。。
都在等其他人写吧。。
我也是新手,说的我都不敢离职了。。
参加
对于生成 DH 参数的命令:openssl dhparam -out /home/ubuntu/www/ssl/dhparam.pem 2048
我们最近遇到一个问题,是快递 100 由于使用 java 6,不支持 2048 位,必须使用 1024,所以如果系统有和其他系统连接,还是要注意一下。
#9 楼 @nowherekai 不是我写的,我只是把bf4 的封装了一下。。
#15 楼 @xiaoronglv 基本都是@gehao 写的。
#5 楼 @lihuazhang 欢迎,保留这个为源地址即可。