Trouble with Capistrano 3 upgrade and (asset) tag helpers in layout not using '/assets' for links

52 views
Skip to first unread message

pixelhandler

unread,
Apr 24, 2014, 8:42:42 PM4/24/14
to capis...@googlegroups.com
Versions:
  • Ruby
  • Capistrano
  • Rake / Rails / etc
Platform:
  • Working on....
  • Deploying to...
Logs:
  • Please past logs (as completely as possible to a 3rd party pasting service such as pastie.org)
Files:
  • Capfile
  • deploy.rb
  • Stage files (production.rb, staging.rb)

I’m having trouble with upgrade from 2 to 3. 

The issue is that I have a layout that renders in an iframe and it’s application css and js links begin with ‘/javascripts’ and ‘/styleheets’ instead of ‘/assets’. 

My main application layout works fine; the applicaiton assets are precompiled and using /assets prefix. 

My env is staging and I’m on ruby , rails , capistrano , . 

The capistrano version 2 deploy does precompile the assets and use ‘/assets’ prefix for the stylesheet_link_tag and javascript_include_tag helpers.


Versions:
  • Ruby 2.0.0p247
  • Capistrano 3.2.0, capistrano-bundler 1.1.2, capistrano-bundler 1.1.2
  • Rails 4.0.3, rake 10.1.0
Platform:
  • Mac (Mavericks)
  • Deploying to Ubuntu 12.04
Logs:
Files:
  • Capfile
  • deploy.rb
  • Stage files (staging.rb)
staging.rb
deploy.rb
Capfile.txt

Bruno Sutic

unread,
Apr 25, 2014, 10:00:38 AM4/25/14
to capis...@googlegroups.com
Hi,
hm, that's a weird problem.
Maybe you wanna check the asset-related tasks capistrano executes during the deploy: link to source here. It's really simple to understand and maybe it will ring a bell for you.

Are you also upgrading Rails or Ruby version in this process? I don't know how capistrano could have anything to do with the output from "stylesheet_link_tag and javascript_include_tag helpers".

Question: why aren't you using 'capistrano/rbenv' gem (or capistrano/rvm if you prefer that)? I see it's commented out in your Capfile.
How do you even know which ruby/rails version your app uses on the server without that?

Not a really helpful answer, but maybe it generated new ideas for you.

pixelhandler

unread,
Apr 25, 2014, 12:17:20 PM4/25/14
to capis...@googlegroups.com
After I posted this I noticed that `set :git_enable_submodules , true` was used in my v2 deploy.rb and I didn't use that in my v3 deploy.rb file. So the helpers for those assets were didn't work as the assets lived in submodules. Didn't realize that capistrano 3 doesn't support git submodules. Need to find a work around.
Reply all
Reply to author
Forward
0 new messages