So I just started working in Vim and it seems to me that every now and then while I'm working (I think the trigger is resetting my shell or reloading Vim), bundle exec will try to run my system ruby and not rvm ruby.
/Users/patrickma.uel/.rvm/gems/ruby-1.9.2-p290/gems/json-1.5.3/ext/json/ext/json/ext/parser.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
How would I stop this from happening
rvm 1.6.32 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.io/]
running on OSX Lion
My temporary fix at the moment is running rvm use 1.9.2 --default
But this is not a real fix.
Hey look my temp fix doesn't work anymore!
$ ruby --version
Press ENTER or type command to continue
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
$ rvm use 1.9.2 --default
Press ENTER or type command to continue
Using /Users/patrickma.uel/.rvm/gems/ruby-1.9.2-p290
Press ENTER or type command to continue
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
Also I'm using ZSH zsh 4.3.11 (i386-apple-darwin11.0)
Seems this issue is only happening from vi! I can run rspec/spec just fine in zsh.
env output from vi
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/patrickma.uel/.rvm/gems/ruby-1.9.2-p290/bin:/Users/patrickma.uel/.rvm/gems/ruby-1.9.2-p290@global/bin:/Users/patrickma.uel/.rvm/rubies/ruby-1.9.2-p290/bin:/Users/patrickma.uel/.rvm/bin
TMPDIR=/var/folders/8b/lwp04gwn4kz02gspddmw56c80000gs/T/
SHELL=/bin/zsh
HOME=/Users/patrickma.uel
USER=patrickma.uel
LOGNAME=patrickma.uel
DISPLAY=/tmp/launch-j3yJS9/org.x:0
SSH_AUTH_SOCK=/tmp/launch-Dt4mlX/Listeners
Apple_PubSub_Socket_Render=/tmp/launch-rGPodT/Render
COMMAND_MODE=unix2003
__CF_USER_TEXT_ENCODING=0x1F9:0:0
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=297
TERM_SESSION_开发者_StackOverflow中文版ID=7AFF4E48-6992-4A53-9E82-2B7498CB51FF
LC_CTYPE=UTF-8
TERM=xterm-256color
SHLVL=1
PWD=/Users/patrickma.uel/Sites/boss.urban-ent.com
OLDPWD=/Users/patrickma.uel/Sites/boss.urban-ent.com
rvm_path=/Users/patrickma.uel/.rvm
rvm_prefix=/Users/patrickma.uel
rvm_version=1.6.32
RUBY_VERSION=ruby 1.9.2p290
GEM_HOME=/Users/patrickma.uel/.rvm/gems/ruby-1.9.2-p290
GEM_PATH=/Users/patrickma.uel/.rvm/gems/ruby-1.9.2-p290:/Users/patrickma.uel/.rvm/gems/ruby-1.9.2-p290@global
MY_RUBY_HOME=/Users/patrickma.uel/.rvm/rubies/ruby-1.9.2-p290
IRBRC=/Users/patrickma.uel/.rvm/rubies/ruby-1.9.2-p290/.irbrc
rvm_reload_flag=0
rvm_alias_expanded=
rvm_archflags=
rvm_docs_type=
rvm_gemdir_flag=
rvm_gemstone_package_file=
rvm_gemstone_url=
rvm_install_on_use_flag=
rvm_niceness=
rvm_nightly_flag=
rvm_patch_original_pwd=
rvm_pretty_print_flag=
rvm_proxy=
rvm_quiet_flag=
rvm_ree_options=
rvm_remove_flag=
rvm_ruby_file=
rvm_ruby_make=
rvm_ruby_make_install=
rvm_ruby_mode=
rvm_ruby_patch=
rvm_ruby_sha=
rvm_ruby_user_tag=
rvm_script_name=
rvm_sdk=
rvm_silent_flag=
rvm_trace_flag=
rvm_wrapper_name=
EDITOR=vim
PS1=$(git_prompt_info)[${SSH_CONNECTION+"%{$fg_bold[green]%}%n@%m:"}%{$fg_bold[blue]%}%~%{$reset_color%}]
HISTSIZE=4096
EYRC=./.eyrc
dirstacksize=5
CLICOLOR=1
rvm_clang_flag=0
rvm_delete_flag=0
rvm_archive_extension=tar.bz2
rvm_bin_flag=
rvm_configure_flags=
rvm_dump_environment_flag=0
rvm_file_name=
rvm_install_args=
rvm_make_flags=
rvm_only_path_flag=
rvm_patch_names=
rvm_ruby_alias=
rvm_ruby_aliases=
rvm_ruby_bits=
rvm_ruby_global_gems_path=/Users/patrickma.uel/.rvm/gems/ruby-1.9.2-p290@global
rvm_ruby_string=ruby-1.9.2-p290
rvm_sticky_flag=
rvm_system_flag=
rvm_use_flag=
rvm_user_flag=
rvm_archives_path=/Users/patrickma.uel/.rvm/archives
rvm_bin_path=/Users/patrickma.uel/.rvm/bin
rvm_config_path=/Users/patrickma.uel/.rvm/config
rvm_docs_path=/Users/patrickma.uel/.rvm/docs
rvm_environments_path=/Users/patrickma.uel/.rvm/environments
rvm_examples_path=/Users/patrickma.uel/.rvm/examples
rvm_gems_cache_path=/Users/patrickma.uel/.rvm/gems/cache
rvm_gems_path=/Users/patrickma.uel/.rvm/gems
rvm_gemsets_path=/Users/patrickma.uel/.rvm/gemsets
rvm_help_path=/Users/patrickma.uel/.rvm/help
rvm_lib_path=/Users/patrickma.uel/.rvm/lib
rvm_log_path=/Users/patrickma.uel/.rvm/log
rvm_patches_path=/Users/patrickma.uel/.rvm/patches
rvm_repos_path=/Users/patrickma.uel/.rvm/repos
rvm_rubies_path=/Users/patrickma.uel/.rvm/rubies
rvm_ruby_configure=
rvm_ruby_url=
rvm_scripts_path=/Users/patrickma.uel/.rvm/scripts
rvm_user_install_flag=1
rvm_src_path=/Users/patrickma.uel/.rvm/src
rvm_tmp_path=/Users/patrickma.uel/.rvm/tmp
rvm_user_path=/Users/patrickma.uel/.rvm/user
rvm_usr_path=/Users/patrickma.uel/.rvm/usr
rvm_wrappers_path=/Users/patrickma.uel/.rvm/wrappers
rvm_man_path=/Users/patrickma.uel/.rvm/man
rvm_action=
rvm_default_flag=
rvm_error_message=
rvm_expanding_aliases=
rvm_gemset_name=
rvm_gemset_separator=
rvm_head_flag=
rvm_llvm_flag=
rvm_loaded_flag=
rvm_parse_break=
rvm_prior_cc=
rvm_ruby_args=
rvm_ruby_binary=
rvm_ruby_gem_home=
rvm_ruby_gem_path=
rvm_ruby_home=
rvm_ruby_interpreter=
rvm_ruby_irbrc=
rvm_ruby_load_path=
rvm_ruby_major_version=
rvm_ruby_minor_version=
rvm_ruby_name=
rvm_ruby_package_file=
rvm_ruby_package_name=
rvm_ruby_patch_level=
rvm_ruby_release_version=
rvm_ruby_repo_url=
rvm_ruby_require=
rvm_ruby_revision=
rvm_ruby_selected_flag=
rvm_ruby_strings=
rvm_ruby_tag=
rvm_ruby_version=
rvm_token=
rvm_ruby_repo_branch=
rvm_debug_flag=0
rvm_verbose_flag=1
_=/usr/bin/env
VIMRUNTIME=/usr/share/vim/vim73
VIM=/usr/share/vim
MYVIMRC=/Users/patrickma.uel/.vimrc
Found the solution @ https://rvm.io/integration/vim/
Thanks to: (#rubyonrails@freenode) Rushed: fivetwentysix: ah, I read that as you didn't like it as a solution, not that it didn't work sorry, I assume you've checked out https://rvm.io/integration/vim/
精彩评论