在包含characther冒号':'的rvm gemset名称中使用时,Gem安装rails失败

时间:2012-08-29 13:38:23

标签: ruby-on-rails-3 rvm

我创建了一个包含冒号的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中的错误,或者是其他?

1 个答案:

答案 0 :(得分:0)

我比较了1.9.31.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