Closed bartb closed 9 years ago
Hi @bartb,
The command is: VORAXConnect (capital C). On Vim 7.3, you need that patch. Unfortunately, I don't have a MAC to test this, but you may have a look here, especially under "MAC OS Notes".
I've just noticed that Pavel Popov's blog post is not available anymore. He was explaining there how it made it work on his MAC.
Okay, got a bit further. I had to copy the folders (autoload, doc, ftplugin, indent, nerdtree_plugin, plugin, syntax, vorax) to ~/.vim.
Now when I do VORAXConnect usr/pwd@orcl
I get the following error:
Initializing connection...
Error detected while processing function vorax#sqlplus#Connect..vorax#sqlplus#Initialize..vorax#ruby#SqlplusFork:
line 13:
ChildProcess::LaunchError: No such file or directory - sqlplus
I have sqlplus installed:
$ sqlplus
SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 11 17:29:05 2014
Copyright (c) 1982, 2012, Oracle. All rights reserved.
Enter user-name:
Is sqlplus in your $PATH, available to your vim? Just check by launching sqlplus from vim:
!sqlplus /nolog
:!sqlplus /nolog
zsh:1: command not found: sqlplus
shell returned 127
That is weird, because I can execute sqlplus right from the shell:
$ which sqlplus
/usr/local/instantclient/sqlplus
Which means your shell sees other $PATH than your vim. You can check this by executing:
!echo $PATH
from your vim. You can also try to launch your vim from that shell.
Indeed, almost there... I just need to change the internal $PATH of MacVim somehow.
Have you tried to run MacVim from your terminal? As a quick workaround, it should see the $PATH from your shell.
Added instantclient to the path of MacVim (in the file ~/.zprofile). But now this:
Initializing connection...
Error detected while processing function vorax#sqlplus#Connect..vorax#sqlplus#Initialize..vorax#ruby#SqlplusFork:
line 13:
Errno::EPIPE: Broken pipe
Any idea?
No, that's odd! I have to install an OSX 10.10.1 in a virtual machine (if possible) and try to reproduce this.
I'll try to find a solution also.
In the mean time, Pavel sent me this updated URL: http://iseetheline.ru/en/vorax/
I'll see if that will help me.
It works!! Woohoo! I used Pavel's .dotfile and vorax.sh to set the environment properly:
$ cat ~/.dotfiles/sqlplus.env
# adding sqlplus variables when they needed
export ORACLE_HOME=/usr/local/instantclient
export SQLPATH=$ORACLE_HOME
export LD_LIBRARY_PATH=$ORACLE_HOME
export DYLD_LIBRARY_PATH=$ORACLE_HOME
export TNS_ADMIN=/usr/local/oracle/network/admin
export NLS_LANG=AMERICAN_AMERICA.UTF8
export VERSIONER_PYTHON_PREFER_32_BIT=yes
export PATH=$SQLPATH:$PATH
$ cat bin/vorax.sh
. $HOME/.dotfiles/sqlplus.env
export VORAX=1
/usr/local/bin/mvim
Then chmod +x bin/vorax.sh
, start the vorax.sh
and presto, it works.
Not sure what did the trick exactly. Probably export DYLD_LIBRARY_PATH
.
Many thanks for your help, Talek!
Let me explain the meaning of VORAX=1 system variable.
I use Oracle Instant Client. In order to use it, one should fill environment variables ORACLE_HOME
, LD_LIBRARY_PATH
and/or DYLD_LIBRARY_PATH
(don't remember exactly which one). But if you set it permanently OS X will give error message every time you run something with sudo. It's a known bug, I have founded information somewhere on the internet.
So, I ended up with running MacVim with Vorax included when I need to work with Oracle - I create VORAX variable and set up all paths to Oracle Instant Client. I also have a condition in .vimrc
to check if VORAX=1 then load Vorax plugin.
When I just need to use Oracle Instant Client (when some scripts needs connection to Oracle) I just do source ~/.dotfiles/sqlplus.env
to fill variables to OIC.
Sorry for broken link in the blog, I'm in the process of splitting posts in Russian from English ones and haven't add link to it.
Thank you Pavel for sharing all this valuable information on running Vorax on MAC. I have updated the wiki with the new link to your blog post. Great!
@bartb: Glad it's working on your MAC too. Have fun!
Hi,
First of all, Vorax looks great!! Can't wait to try it.
I followed the install documentation but I can't seem to work it out.
I have vim 7.3:
return 0 (zero). Don't know if that is good or not.
The Ruby version of VIM is:
I managed to get Vorax installed (after I installed the XCode command tools):
But now when I start Vim and type
i get
Perhaps you know what the problem is? (I should point out that I'm very new to Vim)