Tag: ruby 1.9.3

由于bot,Ruby on Rails“UTF-8中的无效字节序列”

当我滚动我的网站的时候,我有一个由中文bot触发的错误: http : //www.easou.com/search/spider.html 。 我的应用程序的版本都是用Ruby 1.9.3和Rails 3.2.X 这里是一个堆栈跟踪: An ArgumentError occurred in listings#show: invalid byte sequence in UTF-8 rack (1.4.5) lib/rack/utils.rb:104:in `normalize_params' ——————————- Request: ——————————- * URL : http://www.my-website.com * IP address: XXXX * Parameters: {"action"=>"show", "controller"=>"listings", "id"=>"location-t7-villeurbanne–58"} * Rails root: /…/releases/20140708150222 * Timestamp : 2014-07-09 02:57:43 +0200 ——————————- Backtrace: ——————————- rack (1.4.5) lib/rack/utils.rb:104:in […]

ruby的debugging与Ruby 1.9.3?

我刚刚更新到Ruby 1.9.3p0和Rails 3.1.1。 现在,当我尝试启动服务器,它抱怨说,我应该安装ruby-debug ,即使它已经安装。 % rails server –environment=development –debug => Booting WEBrick => Rails 3.1.0 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug' Exiting 在我的Gemfile中有 # see: […]