capistrano / rails

Official Ruby on Rails specific tasks for Capistrano
http://www.capistranorb.com/
MIT License
867 stars 270 forks source link

Fix for root assets_prefix #220

Closed Fudoshiki closed 6 years ago

Fudoshiki commented 6 years ago

Fixes ln stderr: ln: target '/srv/webapp/repository/releases/20180224132230/public/' is not a directory: No such file or directory when set :assets_prefix, ''

capistrano-bot commented 6 years ago

Thanks for the PR! This project lacks automated tests, which makes reviewing and approving PRs somewhat difficult. Please make sure that your contribution has not broken backwards compatibility or introduced any risky changes.

Generated by :no_entry_sign: Danger

mattbrictson commented 6 years ago

@Fudoshiki any reason why you closed this PR? Did you find another fix?

Fudoshiki commented 6 years ago

I have main domain and subdomain for assets

example.com assets.example.com

rails by default compile in assets folder and url will be assets.example.com/assets, but i need just assets.example.com

When I set config.assets.prefix = '' it will work, but will compile assets in root of public folder

It raise many bugs, we can't add public folder in shared paths, how it's doing in PR, coz it's overrride current public folder in release folder

Now I finding the way to remove /assets path from helper, but compile assets in public/assets folder

Fudoshiki commented 6 years ago

We can't set config.assets.prefix = '', it will breaks down deployment and rails assets:clean/clobber tasks

mattbrictson commented 6 years ago

I see. I agree that config.assets.prefix = '' will cause problems in Rails. I don't think we can do anything in Capistrano about that.