我创建了一个包含冒号的rvm gemset名称,假设为project:marklar
,然后我在该gemset中执行gem install rails
。一切顺利,直到它到达json gem并抛出此错误:
Fetching: json-1.7.5.gem (100%)
Building native extensions. This could take a while...
/Users/hendrauzia/.rvm/rubies/ruby-1.9.3p0/lib/ruby/site_ruby/1.9.1/rubygems/ext/builder.rb:48: warning: Insecure world writable dir /usr/local/mysql/bin in PATH, mode 040777
ERROR: Error installing rails:
ERROR: Failed to build gem native extension.
/Users/hendrauzia/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
creating Makefile
make
Makefile:158: *** target pattern contains no `%'. Stop.
我认为导致问题的是ruby版本,但是当我更改为1.9.2
时,它仍会抛出相同的错误。
我使用mac osx 10.8山狮,令人惊讶的是,当我删除gemset名称中的冒号时,假设我们将其更改为marklar
,一切顺利。有人注意到这种行为?这种行为是预期的还是rvm或json gem中的错误,或者是其他?
答案 0 :(得分:0)
我比较了1.9.3
和1.9.3@some:colon
中定义的Makefile - 除了路径之外没有区别:
127,128c127,128
< RUBYLIBDIR = /home/mpapis/.rvm/gems/ruby-1.9.3-p194/gems/json-1.7.5/lib$(target_prefix)
< RUBYARCHDIR = /home/mpapis/.rvm/gems/ruby-1.9.3-p194/gems/json-1.7.5/lib$(target_prefix)
---
> RUBYLIBDIR = /home/mpapis/.rvm/gems/ruby-1.9.3-p194@some:colon/gems/json-1.7.5/lib$(target_prefix)
> RUBYARCHDIR = /home/mpapis/.rvm/gems/ruby-1.9.3-p194@some:colon/gems/json-1.7.5/lib$(target_prefix)
进一步检查后,我发现文件名中不允许使用空格和冒号:Escaping colons in filenames in a Makefile =&gt; http://www.mail-archive.com/bug-make@gnu.org/msg03318.html