2011-01-08 32 views
1

我正在使用RVM并想安装另一个版本的Ruby。RVM。在安装ruby时得到与git相关的错误

$ rvm install 1.9.2-head 
/Users/ovsiiko/.rvm/rubies/ruby-1.9.2-head, this may take a while depending on your cpu(s)... 

ruby-1.9.2-head - #fetching 
error: You have local changes to 'win32/configure.bat'; cannot switch branches. 
From https://github.com/ruby/ruby 
* branch   ruby_1_9_2 -> FETCH_HEAD 
error: Your local changes to 'win32/configure.bat' would be overwritten by merge. Aborting. 
Please, commit your changes or stash them before you can merge. 
There has been an error while checking out branch ruby_1_9_2.   
Halting the installation. 
There has been an error fetching the ruby interpreter. Halting the installation. 

Spotlight不会看到没有win32文件夹也不configure.bat文件。 Actualy我没有得到这个错误消息涉及的文件夹。 在我最近的所有基于git的项目中已经有git stash并且保持相同。

任何想法如何解决这个问题?

谢谢

P.S.我使用的MacOS X 10.6.4

更新: 我已经卸载RVM然后重新安装,并再次尝试......

$ rvm install 1.9.2-head 
/Users/ovsiiko/.rvm/rubies/ruby-1.9.2-head, this may take a while depending on your cpu(s)... 

ruby-1.9.2-head - #fetching 
Cloning from https://github.com/ruby/ruby.git, this may take a while depending on your connection... 
Initialized empty Git repository in /Users/ovsiiko/.rvm/repos/ruby-1.9.2-head/.git/ 
remote: Counting objects: 30907, done. 
remote: Compressing objects: 100% (14057/14057), done. 
remote: Total 30907 (delta 23362), reused 22680 (delta 16110) 
Receiving objects: 100% (30907/30907), 21.45 MiB | 261 KiB/s, done. 
Resolving deltas: 100% (23362/23362), done. 
Checking out files: 100% (3515/3515), done. 
error: You have local changes to 'symbian/configure.bat'; cannot switch branches. 
From https://github.com/ruby/ruby 
* branch   ruby_1_9_2 -> FETCH_HEAD 
error: Your local changes to 'symbian/configure.bat' would be overwritten by merge. Aborting. 
Please, commit your changes or stash them before you can merge. 
There has been an error while checking out branch ruby_1_9_2.   
Halting the installation. 
There has been an error fetching the ruby interpreter. Halting the installation. 

现在这种尝试在symbian/configure.bat返回的错误。

难道是病毒吗?

+0

只是提示:Spotlight没有找到文件的事实并不意味着它不存在。 Spotlight不索引整个文件系统。要获得更完整的搜索,请使用[find](http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/find.1.html) – asymmetric 2011-01-11 11:11:46

回答

0

rvm抱怨的git回购很显然是在~/.rvm下发现的那个,特别是ruby-1.9.2-head回购。

转到~/.rvm/repos/ruby-1.9.2-head,藏起你的变化,你应该没问题。

+0

谢谢您的提示。在git存放在〜/ .rvm/repos/ruby​​-1.9.2-head之后,我应该用什么rvm命令来安装-head版本? 'rvm install 1.9.2-head'再次返回相同的错误...谢谢 – elias 2011-01-11 21:31:46

1

有同样的问题。看起来像是RVM出现了一些混乱,这个命令修复了它。

$ rvm cleanup repos