小编dav*_*shi的帖子

为什么URI.escape()标记为过时,这个REGEXP :: UNSAFE常量在哪里?

我试图弄清楚ruby 2.2.3中URI.escape的默认不安全字符集是什么.该文件说:

默认情况下使用REGEXP :: UNSAFE

但我无法在URI模块中找到任何常量.

此外,此代码(下面的代码段)自2009年以来标记为"过时"的escape/unescape方法.为什么它们已经过时了?

lib/uri/common.rb:97

def escape(*arg)
  warn "#{caller(1)[0]}: warning: URI.escape is obsolete" if $VERBOSE
  DEFAULT_PARSER.escape(*arg)
end
Run Code Online (Sandbox Code Playgroud)

文档是错误/过时了吗?

ruby

12
推荐指数
3
解决办法
3075
查看次数

OS X 上的捆绑错误

这是错误日志,当我使用bundle install.

我想在Github上搭建一个博客,所以使用Octopress,但是没有成功。如果您有其他方法,请告诉我,谢谢。

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
checking for main() in -lc... yes
creating Makefile

make "DESTDIR="
make: *** No rule to make target `"/Applications/Xcode', needed by `redcloth_attributes.o'.  Stop.


Gem files will remain installed in /var/folders/zb/bxbkz6pd5fscs29zq2hk1b4h0000gn/T/bundler20141230-81071-q2p8fv/RedCloth-4.2.9/gems/RedCloth-4.2.9 for inspection.
Results logged to /var/folders/zb/bxbkz6pd5fscs29zq2hk1b4h0000gn/T/bundler20141230-81071-q2p8fv/RedCloth-4.2.9/gems/RedCloth-4.2.9/ext/redcloth_scan/gem_make.out
An error occurred while installing RedCloth (4.2.9), and Bundler cannot
continue.
Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling.
Run Code Online (Sandbox Code Playgroud)

ruby bundle ruby-on-rails bundler

6
推荐指数
2
解决办法
2596
查看次数

标签 统计

ruby ×2

bundle ×1

bundler ×1

ruby-on-rails ×1