asok / projectile-rails

Emacs Rails mode based on projectile
258 stars 59 forks source link

Doesn't find stylesheets #92

Closed cybercode closed 8 years ago

cybercode commented 8 years ago

Recently, projectile-rails-find-stylesheet no longer finds any matches from app/assets/stylesheets. Verified in emacs -q and then explicitly loading libraries from a fresh melpa update.

asok commented 8 years ago

I cannot reproduce it. What exactly is happening? Nothing happens when you run the command?

Maybe something wrong is happening because you are using a pre-loader? Please make sure that neither spring nor zeus are running. Do you have this issue on all rails projects?

cybercode commented 8 years ago

On Sat, May 07, 2016 at 02:36:53AM -0700, Adam Sokolnicki wrote:

I cannot reproduce it. What exactly is happening? Nothing happens when you run the command?

I just get a prompt: 0 [project] stylesheets:, and no file list.

Maybe something wrong is happening because you are using a pre-loader? Please make sure that neither spring nor zeus are running. Do you have this issue on all rails projects?

No preloader, and it is only stylesheets; model, controllers, etc work fine. Good call though, it is only on one project, but responds the same on multiple computers.

I tried edebugging the call, but get lost in the macro... Any ideas where i should look/set a breakpoint?

rick

cybercode commented 8 years ago

Followup-- It seems that in this project (only) projectile-rails-stylesheet-dirs is being set to nil.

The problem is:

I have a project (in the projectile sense):

projectroot | .git | server (ROR) | client (javascript

projectile-rails--file-exists-p calls projectile-expand-root when it should call projectile-rails-expand-root,

So projectile-rails-set-assets-dirs is failing to find any javascript or stylesheet directories.

asok commented 8 years ago

@cybercode this should do it please let me know if not.