meeech / shopify.tmbundle

A bundle for interacting with Shopify Theme Assets.
http://meeech.github.com/shopify.tmbundle/
136 stars 31 forks source link

mkdir(): Permission denied in /private/tmp #52

Closed Spacetrader closed 12 years ago

Spacetrader commented 12 years ago

Thanks Meeech for this incredible job!

I'm a first time Textmate user and I'm getting the following error message when I try to download full theme:

PHP Warning: mkdir(): Permission denied in /private/tmp/temp_textmate.pxQc8P on line 59 Fetching templates/search.liquid...

What I have already tried:

-Checked /private/tmp permissions:

sh-3.2# ls -la /private/ |grep "tmp"

drwxrwxrwx 14 root wheel 476 18 Fev 16:43 tmp

-Variables via preferences

-Installed Liquid

-Installed shopify.tmbundle via Get Bundle

-Installed shopify.tmbundle via download and double-click

-Installed MAMP

-Create a config file .shopify-tmbundle and saved on Project Directory

-Create a config file .shopify-tmbundle and just saved (it goes to root dir /)

I think I'm lost...

Any help?

Spacetrader commented 12 years ago

I have dived in the code to help someone help me… :-)

First I echoed the vars "API Key" and "Password" and they are correct!

Then I find the line where I'm getting the error:

mkdir($folderPath);

The $folderPath var is made of "TM_PROJECT_DIRECTORY" and "$fileinfo['dirname']"

TM_PROJECT_DIRECTORY is empty!

So at the moment I'm trying to discover why, any help?

Just to double-check: create a new folder in your OS where you'd like to store your project assets and other files, and create a new file inside of the folder. Open that project folder in TextMate and open the new file, then go to Bundles > Shopify > Download Full Theme.

Thanks!

meeech commented 12 years ago

Hey, lets start with this:

re: checking TM_PROJECT_DIRECTORY - you can get the TM Vars for the project like this:

Open the project. make sure a file in the project is open (remember - to make a project, you must drag the folder to textmate, then Save As Project).

Then, in Bundles look for Bundle Development > Show TM_* Variables

If you aren't seeing the TM_PROJECT_DIRECTORY var, then something is not right - usually it means you aren't working out of a project. But thats where the perm error seems to be coming from, not from the perms on the tmp dir.

Spacetrader commented 12 years ago

Great!! I was doing it all wrong... After dropping the folder like you mention everything start to work (and make sense) :-)

But I can see the files on Finder but not on Textmate project folder. Is there a refresh button?

meeech commented 12 years ago

you should see them. Usually TM will refresh when you switch to desktop, then back to textmate. make sure you click the expand arrow in the textmate file listings.

Spacetrader commented 12 years ago

Perfect!!

Thank you!!