2013-06-23 38 views
0

我试图破灭的RVM并从头开始安装一切,奇怪的是它的工作,直到我重新启动我的shell(我使用的zsh,但同样发生在bash)的。安装了Ruby不运行(说NoMemoryError)

控制台输出:

➜ ~backend_folder git:(master) ✗ which rails 

/Users/shaioz/.rvm/gems/ruby-1.9.3-p429/bin/rails 

➜ ~backend_folder git:(master) ✗ rails server 

ruby(10188,0x7fff7176c180) malloc: *** mmap(size=1125878379425792) failed (error code=12) 
*** error: can't allocate region 
*** set a breakpoint in malloc_error_break to debug 
ruby(10188,0x7fff7176c180) malloc: *** mmap(size=1125878379425792) failed (error code=12) 
*** error: can't allocate region 
*** set a breakpoint in malloc_error_break to debug 
/Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require': failed to allocate memory (NoMemoryError) 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/debugger-1.6.0/lib/ruby-debug-base.rb:1:in `<top (required)>' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/debugger-1.6.0/lib/ruby-debug.rb:5:in `<top (required)>' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `block in require' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `block in load_dependency' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:640:in `new_constants_in' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:223:in `load_dependency' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/activesupport-3.1.1/lib/active_support/dependencies.rb:240:in `require' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/debugger-1.6.0/lib/debugger.rb:4:in `<top (required)>' 
    from /Users/shaioz/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require' 
    from /Users/shaioz/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require' 
    from /Users/shaioz/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each' 
    from /Users/shaioz/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require' 
    from /Users/shaioz/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each' 
    from /Users/shaioz/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require' 
    from /Users/shaioz/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler.rb:132:in `require' 
    from /Users/shaioz/projects/flayvr-backend/config/application.rb:7:in `<top (required)>' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.1.1/lib/rails/commands.rb:52:in `require' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.1.1/lib/rails/commands.rb:52:in `block in <top (required)>' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.1.1/lib/rails/commands.rb:49:in `tap' 
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429/gems/railties-3.1.1/lib/rails/commands.rb:49:in `<top (required)>' 
    from script/rails:6:in `require' 
    from script/rails:6:in `<main>' 

(这也发生在我使用内部评级法,我至少有2 GB的可用RAM) 当我尝试“RVM得到”,我得到这个:

cat: /Users/shaioz/.rvm/help/get: No such file or directory 
Could not update RVM, get some help at #rvm IRC channel at freenode servers. 

但奇怪的是rvm没有安装在sudo用户上,.rvm位于我的用户的homedir上。 我在OSX 10.8.3

+0

什么'型RVM的输出|头-n 1'? –

+0

'RVM是一个shell function' – shaioz

+0

确定这是很好的。也许试试'rvm requirements'并看看它是否告诉你一些有用的东西? –

回答

0

运行我想通了。 在$ PATH,我有超过通过RVM安装红宝石当地红宝石取先例,但轨道是一个由RVM安装相匹配的红宝石版本。 (不正确的$ PATH是由于我zshrc不需要的条目)

总之

,如果你有类似的问题尽量

$ which ruby; which rails 

,看看它们是正确的版本。

相关问题