New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build tags on OS X Mountain LIon #90

Closed
noonehos opened this Issue Nov 19, 2012 · 6 comments

Comments

Projects
None yet
5 participants
@noonehos

noonehos commented Nov 19, 2012

(ReOpened Issue from #18 becouse problem still need to answer)

OS X 10.8
ST 2
ctags 5.8 installed from mac ports

I'm getting the following error:

EnvironmentError: (u'ctags -R -f .tags', 1, 'ctags: illegal option -- R\nusage: ctags [-BFadtuwvx] [-f tagsfile] file ...\n')

But running ctags -R -f .tags works fine from the terminal (with sudo and without sudo).
And if I run ST2 from termainal with sudo (like :user$ sudo open /Applic.../S..T..2/...), all works fine
Any thoughts?

@noonehos

This comment has been minimized.

Show comment
Hide comment
@noonehos

noonehos Nov 19, 2012

Okay, I am now have answer so i close issue.
Answer:
I use command which ctags in terminal to see where it. In my case it's: /opt/local/bin/ctags but i have ctags also in /usr/bin/ctags, so i was confused. I try to set hardly path /opt/local/bin/ctags in plugin setings:
{ "debug" : false, "ctags_command" : "/opt/local/bin/ctags -R -f .tags", ... }
and its work!
results from ST2 console:
Re/Building CTags for /work/sources/DBtree/.tags: Please be patient Finished building /work/sources/DBtree/.tags

noonehos commented Nov 19, 2012

Okay, I am now have answer so i close issue.
Answer:
I use command which ctags in terminal to see where it. In my case it's: /opt/local/bin/ctags but i have ctags also in /usr/bin/ctags, so i was confused. I try to set hardly path /opt/local/bin/ctags in plugin setings:
{ "debug" : false, "ctags_command" : "/opt/local/bin/ctags -R -f .tags", ... }
and its work!
results from ST2 console:
Re/Building CTags for /work/sources/DBtree/.tags: Please be patient Finished building /work/sources/DBtree/.tags

@noonehos noonehos closed this Nov 19, 2012

@barneywilliams

This comment has been minimized.

Show comment
Hide comment
@barneywilliams

barneywilliams Nov 20, 2012

Member

Great! Yeah, that is fine solution to specify the proper ctags in the settings file. The alternative would be to add the path to your desired ctags by adding it to your PATH environment variable. I usually just add an export statement to my ~/.bash_profile, which is the dominant profile file on OSX (others are ~/.bash_login and then ~/.profile). Refer to this post for more info: http://johnnywey.wordpress.com/2008/04/17/fixing-bash-profile-in-os-x/

If you want to go allllll the way, you can tack the ctags PATH modification in /etc/profile . This will then work for all users of your system, and also for shortcuts for launching Sublime
outside of the shell.

Member

barneywilliams commented Nov 20, 2012

Great! Yeah, that is fine solution to specify the proper ctags in the settings file. The alternative would be to add the path to your desired ctags by adding it to your PATH environment variable. I usually just add an export statement to my ~/.bash_profile, which is the dominant profile file on OSX (others are ~/.bash_login and then ~/.profile). Refer to this post for more info: http://johnnywey.wordpress.com/2008/04/17/fixing-bash-profile-in-os-x/

If you want to go allllll the way, you can tack the ctags PATH modification in /etc/profile . This will then work for all users of your system, and also for shortcuts for launching Sublime
outside of the shell.

@noonehos

This comment has been minimized.

Show comment
Hide comment
@noonehos

noonehos Nov 20, 2012

In my case alternative such export Path not work:
echo $PATH /opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

  • So my correct path to ctags /opt/local/bin/ and it first in $PATH but plugint not see it if i write in settings file simple 'ctags -R ...'
    works only with '/opt/local/bin/ctags -R...'

noonehos commented Nov 20, 2012

In my case alternative such export Path not work:
echo $PATH /opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

  • So my correct path to ctags /opt/local/bin/ and it first in $PATH but plugint not see it if i write in settings file simple 'ctags -R ...'
    works only with '/opt/local/bin/ctags -R...'
@brianlow

This comment has been minimized.

Show comment
Hide comment
@brianlow

brianlow Oct 23, 2014

This worked for me in ST3 after brew install ctags.

Sublime3 -> Preferences -> Package Settings -> CTags -> Settings - User:

{ 
    "command" : "/usr/local/bin/ctags"
}

brianlow commented Oct 23, 2014

This worked for me in ST3 after brew install ctags.

Sublime3 -> Preferences -> Package Settings -> CTags -> Settings - User:

{ 
    "command" : "/usr/local/bin/ctags"
}
@nejadb

This comment has been minimized.

Show comment
Hide comment
@nejadb

nejadb Mar 11, 2015

@brianlow
Worked for me! Even with "which ctags" pointing to the correct location I needed this in my settings to get it to work. Thank you.

nejadb commented Mar 11, 2015

@brianlow
Worked for me! Even with "which ctags" pointing to the correct location I needed this in my settings to get it to work. Thank you.

@muhammad-meraj

This comment has been minimized.

Show comment
Hide comment
@muhammad-meraj

muhammad-meraj Jan 10, 2017

@brianlow , Thanks, it works.

muhammad-meraj commented Jan 10, 2017

@brianlow , Thanks, it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment