Shopify/shopify_theme

theme watch error: File does not exist

igMartin opened this issue · 7 comments

I´m running Windows 7, Ruby 1.9.3, Rails 3.2.21. I get right the theme_ID, and the config.

While executing the command 'theme watch' I´m getting this error:

C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/filewatcher-0.5.2/lib/filew
atcher.rb:30:in `block in initialize': File does not exist (RuntimeError)
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/filewatcher-0.
5.2/lib/filewatcher.rb:29:in `each'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/filewatcher-0.
5.2/lib/filewatcher.rb:29:in `initialize'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/shopify_theme-
0.0.25/lib/shopify_theme/cli.rb:227:in `new'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/shopify_theme-
0.0.25/lib/shopify_theme/cli.rb:227:in `watcher'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/shopify_theme-
0.0.25/lib/shopify_theme/cli.rb:170:in `watch'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/li
b/thor/command.rb:27:in `run'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/li
b/thor/invocation.rb:126:in `invoke_command'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/li
b/thor.rb:359:in `dispatch'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.19.1/li
b/thor/base.rb:440:in `start'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/shopify_theme-
0.0.25/bin/theme:26:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.3/bin/theme:23:in `load'
        from C:/RailsInstaller/Ruby1.9.3/bin/theme:23:in `<main>'

I set up a Devian Live environment because I got tired of this issue, thinking it was a Windows stuff. But getting everything to work still get the same error!! This time running Devian 8.
Could someone help please!!

What are the steps you've made?

For a typical setup it would be something like this (in the folder you want to work on your theme from):

theme configure <app_key> <app_secret>
theme download
theme watch

Hi Christopher, I've clone a shopify project from a repository, so I didn't need the first 2 steps, cause it came along with the project itself. Then I've configured the theme ID. Every command just works fine, like 'theme open', but still got problems with 'theme watch'.
Thanks for answering!

Getting the same issue on Windows 7 w/ Ruby 1.9.2 and Ruby 2.1.0.

Works correctly on OSX Yosemite w/ Ruby 2.2.3.

C:/Ruby21/lib/ruby/gems/2.1.0/gems/filewatcher-0.5.2/lib/filewatcher.rb:30:in `block in initialize': File does not exist (RuntimeError)
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/filewatcher-0.5.2/lib/filewatcher.rb:29:in `each'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/filewatcher-0.5.2/lib/filewatcher.rb:29:in `initialize'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/shopify_theme-0.0.25/lib/shopify_theme/cli.rb:227:in `new'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/shopify_theme-0.0.25/lib/shopify_theme/cli.rb:227:in `watcher'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/shopify_theme-0.0.25/lib/shopify_theme/cli.rb:170:in `watch'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from C:/Ruby21/lib/ruby/gems/2.1.0/gems/shopify_theme-0.0.25/bin/theme:26:in `<top (required)>'
        from C:/Ruby21/bin/theme:23:in `load'
        from C:/Ruby21/bin/theme:23:in `<main>'

After some testing, looks like the node_modules directory is the culprit in our case. I'm guessing this has to do with Windows' 260 characters path length limitation. An easy fix is to move the theme to a subfolder and run theme watch from there.

Thanks for the clue louisroy! It worked fine.

Guaby commented

Having trouble with this too. @louisroy I've move the project to a subfolder and still not working. Still the same results as @igMartin.