Vision 3.2.0 Theme Download Problems

by Billee D. - Member - 03:53AM, Jun 21, 2008

FYI: I recently downloaded the new Vision 3.2.0 and ran into a problem when trying to export the theme that I was working on. I will give a brief outline of my setup and the steps I took to fix the problem. Hopefully this will help others who may be experiencing the same issues with the new Vision.

Setup: Macbook Pro w/ OS X 10.5.3
Vision Version: 3.2.0

Issue(s):
When attempting to export my theme from the Vision dashboard, I received the following error:

==================================================
Errno::ENOENT
Message:

    No such file or directory - /Volumes/HAGRID/clients/Tanasi Candles/web/tanasisoycandles.com/vision/server/../exports/tanasicandles2008.theme.zip

Parameters:

    {"theme"=>"tanasicandles2008", "readme"=>"\"Tanasi Candles & Gift Baskets\" Theme for Shopify\r\n\r\nby William Dodson | Outer Banks Design Works\r\n\r\nhttp://www.obxdesignworks.com"}

Backtrace:

    {ROOT}/app/servlets/theme_picker_servlet.rb:153:in `initialize'
    {ROOT}/app/servlets/theme_picker_servlet.rb:153:in `open'
    {ROOT}/app/servlets/theme_picker_servlet.rb:153:in `zip'
    {ROOT}/app/servlets/theme_picker_servlet.rb:30:in `zip_theme'
    {ROOT}/lib/servlet.rb:101:in `send'
    {ROOT}/lib/servlet.rb:101:in `invoke_action'
    {ROOT}/lib/servlet.rb:39:in `do_POST'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `__send__'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpservlet/abstract.rb:35:in `service'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in `start'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:95:in `start'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in `each'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:92:in `start'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:23:in `start'
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/webrick/server.rb:82:in `start'
    vision.rb:30
==================================================

Being rather intrepid and handy with Ruby, I opened up the following file:
/vision/server/app/servlets/theme_picker_servlet.rb

And on line 27, I changed this line:
location = "#{ROOT}/../exports/#{theme}.theme.zip"

To this:
location = "/exports/#{theme}.theme.zip"

I then restarted Vision and I was able to download the theme. Of course, this is not a big deal; I could have easily zipped the theme myself. But unless the person using Vision is also a programmer (and proficient in Ruby/Rails) they would be utterly lost.

This issue could also be intrinsic to my local setup. Without doing a little debugging I would have to guess that this is simply a path syntax mistake, since the #{ROOT} variable points to the /vision/server/ folder and not the main Vision folder itself.

This could also just be an issue with Macs with Ruby pre-installed. I had never seen this issue before I switched to Vision 3.2.0 and I am hoping to share my experience with you folks in case this is a real bug and not some silly path issue on my Mac.

Hopefully this helps others like myself who may be scratching their heads wondering why they cannot download their themes from Vision 3.2.0. Has anyone else seen this issue before? I searched the forums and came up with nothing.

@Tobi: If you are interested I can send you the updated theme_picker_servlet.rb for review. Anything that I can do to help just let me know! :-)

Billee D.

---

William Dodson
Outer Banks Design Works
http://www.obxdesignworks.com/

tobi

Shopify

03:20PM, Jun 21, 2008

i’m on the road right now but can you please send me an email ( tobi jadedpixel.com ) with the changes.

Thank you very much for looking into this.

I also recently published vision to github: http://github.com/Shopify/vision/tree/master

---

Tobias Lütke
Shopify – Founder, CEO

Gilbert Lee

Member

06:41AM, Jun 24, 2008

I am having the same export problem using Vision Version 3.2.0. Please help! What should I do?

Billee D.

Member

03:22PM, Jun 24, 2008

@Gilbert Lee:

I have sent the file that I edited to Tobi and he will take a look at the problem when he gets a chance. I have not checked out the latest version from GitHub, but it may be what you need. Just hit the link that Tobi posted above if you want to give it a try. :-)

Billee D.

---

William Dodson
Outer Banks Design Works
http://www.obxdesignworks.com/

Billee D.

Member

03:31PM, Jun 24, 2008

I should also mention that my changes are still not correct as posted above, so I would not advise changing anything with your Vision setup just yet. Let’s see what Tobi finds out and wait to see what he advises for us to do.

Billee D.

---

William Dodson
Outer Banks Design Works
http://www.obxdesignworks.com/

Gilbert Lee

Member

03:58AM, Jun 25, 2008

Thanks Billee D. I went to the link tobi gave above and tried to download the latest but unfortunately got this:

“This repo is too large to generate a tarball. Please file a bug report.”

Looks like I will have to wait.

James MacAulay

Shopify

06:09PM, Jul 02, 2008

It looks like it’s the path with a space in it which is making Vision choke. I’m going to fix it now, but you should be able to work around the problem for the time being by moving Vision to some path with no spaces (like /Applications on OS X, perhaps).

Edit: just to give people a heads up…changing the location to "/exports/#{theme}.theme.zip" as described in the original post would make an /exports directory in the root of your drive.

---

James MacAulay
Shopify Developer

Billee D.

Member

03:23PM, Jul 07, 2008

@James:
I actually found that rogue “exports” folder as well and noted it to Tobi in the email I sent to him. It did seem odd to me that Vision would have access to folders outside of it’s root folder.

Thanks for looking out. :-)

---

William Dodson
Outer Banks Design Works
http://www.obxdesignworks.com/

You must login to post a comment!

Don't have an account yet? Sign up for one.