Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 通过RVM安装的ruby不';(诺默耶罗说)_Ruby On Rails_Ruby_Macos_Shell_Rvm - Fatal编程技术网

Ruby on rails 通过RVM安装的ruby不';(诺默耶罗说)

Ruby on rails 通过RVM安装的ruby不';(诺默耶罗说),ruby-on-rails,ruby,macos,shell,rvm,Ruby On Rails,Ruby,Macos,Shell,Rvm,我尝试过使rvm内爆,从头开始安装所有东西,奇怪的是,它一直工作到我重新启动shell(我使用zsh,但在bash上也发生了同样的情况) 控制台输出: ➜ ~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) m

我尝试过使rvm内爆,从头开始安装所有东西,奇怪的是,它一直工作到我重新启动shell(我使用zsh,但在bash上也发生了同样的情况)

控制台输出:

➜  ~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/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
    from /Users/shaioz/.rvm/gems/ruby-1.9.3-p429@global/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>'
但奇怪的是,rvm没有安装在sudo用户上,而.rvm则安装在我用户的homedir上。 我在OSX 10.8.3上运行,我找到了答案。 在$PATH中,我让本地ruby先于rvm安装的ruby,但rails是rvm安装的与ruby版本相匹配的rails。 (不正确的$PATH是由于我的zshrc中有一个不必要的条目)

简而言之,如果你有类似的问题,试着

$ which ruby; which rails

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

rvm类型头-n 1的输出是什么?
rvm是一个外壳函数
Ok,这很好。也许可以试试
rvm需求
,看看它是否告诉您一些有用的信息?我想这也是一件好事。请显示
rvm配置get
$ which ruby; which rails