Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precompile with regex does not work #269

Open
schneems opened this issue Aug 27, 2015 · 8 comments
Open

Precompile with regex does not work #269

schneems opened this issue Aug 27, 2015 · 8 comments

Comments

@schneems
Copy link
Member

When you add this to your precompile

config.assets.precompile << %r(bootstrap/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff2?)$)

The regex gets passed directly to sprockets, and sprockets doesn't know what to do with it so it blows up.

This was reported in rails/sprockets#117. This worked in sprockets-rails 2.3.2 and fails in version 3.0.0.beta2 (commit e65e088).

@Andreis13
Copy link
Contributor

Sprockets 3.0.0 deprecated precompile filters such as regexps and procs, thus sprockets-rails requires the user to specify the files that are to be compiled in a manifest file (assets/manifest.js) through the use of link and link_tree directives.

@schneems
Copy link
Member Author

We need to make that clear. We should go through a deprecation cycle (warn in one 2.x release and remove in the 3.x release). Once out, we should make the interface explicit by raising a helpful error message if invalid input is provided. We can't rip it out with no warning.

@Andreis13
Copy link
Contributor

Actually Sprockets 3 still supports these filters but the functionality is provided by a legacy.rb file (which is removed from Sprockets 4).

Sprockets-rails works with both approaches but I agree that we could add some kind of warnings on this level to prevent the old method.

@schneems
Copy link
Member Author

Ahh, okay. I kinda inherited sprockets 😁 i'm still discovering dusty corners.

Instead of actually printing out any deprecation notices, the sprockets legacy.rb added a code comments:

    # Deprecated: Change default return type of resolve() to return 2.x

ಠ_ಠ

We should probably deprecate in sprockets-rails (high level for a nicer error message) and in Sprockets 3 as well. Do you have any idea where this behavior actually comes from in sprockets?

@Andreis13
Copy link
Contributor

I also dived into Sprockets not so long ago, so I might be wrong about this, but from my point of view there are a couple of issues concerning the separation of responsibility between sprockets and sprockets-rails. I think the precompile assets list is one of them. Logically, sprockets-rails is the one which should keep track of assets that must be compiled and of them being listed somewhere. However, the use of filters required them to be compiled into uniform lambdas, and the functionality for this was placed in sprockets. As a result this thing was scattered between two gems. Lately it was decided to move away from filters and give way to manifests because these might provide greater benefits and a uniform interface for ES6 modules, as I understand.

Once again, I might be wrong about this :)

@schneems
Copy link
Member Author

That's the fun part, I have no historical context (^_^)/. That sounds reasonable.

I re-opened the sister issue. I'll take a look into deprecating things there in a bit.

@icecold21
Copy link

icecold21 commented Feb 16, 2017

This issue has been fixed in this commit, but it's still in branch master.

FortAwesome/font-awesome-sass@b8dd32c

@ferydjzz
Copy link

+1 for @icecold21

wa0x6e added a commit to wa0x6e/world-flags that referenced this issue Oct 12, 2019
Regex support for precompile option has been deprecated since Sprockets 3, and removed in v4

See rails/sprockets-rails#269
johnnybenson added a commit to johnnybenson/bootstrap-generators that referenced this issue Jan 6, 2020
elrayle added a commit to cul-it/exhibits-library-cornell-edu that referenced this issue Feb 25, 2020
sprockets 4 is incompatible with font-awesome 4.5.  It is compatible with font-awesome 5.12.

Ref:

FortAwesome/font-awesome-sass@b8dd32c

rails/sprockets-rails#269

rails/sprockets-rails#333
elrayle added a commit to cul-it/exhibits-library-cornell-edu that referenced this issue Mar 3, 2020
sprockets 4 is incompatible with font-awesome 4.5.  It is compatible with font-awesome 5.12.

Ref:

FortAwesome/font-awesome-sass@b8dd32c

rails/sprockets-rails#269

rails/sprockets-rails#333

create directory before files

use relative path for logs as the script runs in the staging directory

delete sidekiq_permissions

add version to footer

Revert "Merge pull request #223 from cul-it/remove_sidekiq_perm"

This reverts commit 9a79fe9, reversing
changes made to a27bf85.

Revert "Merge pull request #221 from cul-it/remove/sidekiq_perm"

This reverts commit a27bf85, reversing
changes made to 4ec6261.

Revert "Merge pull request #220 from cul-it/tweak/sidekiq_perm"

This reverts commit 4ec6261, reversing
changes made to 2e78d3f.
elrayle added a commit to cul-it/exhibits-library-cornell-edu that referenced this issue Mar 3, 2020
Revert "use container_commands instead of commands for update_bundler"

This reverts commit 6a77206.

tmp pin of sprockets

sprockets 4 is incompatible with font-awesome 4.5.  It is compatible with font-awesome 5.12.

Ref:

FortAwesome/font-awesome-sass@b8dd32c

rails/sprockets-rails#269

rails/sprockets-rails#333

create directory before files

use relative path for logs as the script runs in the staging directory

delete sidekiq_permissions

add version to footer

Revert "Merge pull request #223 from cul-it/remove_sidekiq_perm"

This reverts commit 9a79fe9, reversing
changes made to a27bf85.

Revert "Merge pull request #221 from cul-it/remove/sidekiq_perm"

This reverts commit a27bf85, reversing
changes made to 4ec6261.

Revert "Merge pull request #220 from cul-it/tweak/sidekiq_perm"

This reverts commit 4ec6261, reversing
changes made to 2e78d3f.

Revert "Merge pull request #217 from cul-it/update/bundler"

This reverts commit 559a61d, reversing
changes made to 7f0885c.

Revert "Merge pull request #215 from cul-it/fix/missing_script_method2"

This reverts commit 7f0885c, reversing
changes made to a6c00c3.

Revert "Merge pull request #214 from cul-it/refactor/permissions_script"

This reverts commit a6c00c3, reversing
changes made to 37b1622.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.
elrayle added a commit to cul-it/exhibits-library-cornell-edu that referenced this issue Mar 3, 2020
use container_commands instead of commands for update_bundler

Revert "use container_commands instead of commands for update_bundler"

This reverts commit 6a77206.

tmp pin of sprockets

sprockets 4 is incompatible with font-awesome 4.5.  It is compatible with font-awesome 5.12.

Ref:

FortAwesome/font-awesome-sass@b8dd32c

rails/sprockets-rails#269

rails/sprockets-rails#333

create directory before files

use relative path for logs as the script runs in the staging directory

delete sidekiq_permissions

add version to footer

Revert "Merge pull request #223 from cul-it/remove_sidekiq_perm"

This reverts commit 9a79fe9, reversing
changes made to a27bf85.

Revert "Merge pull request #221 from cul-it/remove/sidekiq_perm"

This reverts commit a27bf85, reversing
changes made to 4ec6261.

Revert "Merge pull request #220 from cul-it/tweak/sidekiq_perm"

This reverts commit 4ec6261, reversing
changes made to 2e78d3f.

Revert "Merge pull request #217 from cul-it/update/bundler"

This reverts commit 559a61d, reversing
changes made to 7f0885c.

Revert "Merge pull request #215 from cul-it/fix/missing_script_method2"

This reverts commit 7f0885c, reversing
changes made to a6c00c3.

Revert "Merge pull request #214 from cul-it/refactor/permissions_script"

This reverts commit a6c00c3, reversing
changes made to 37b1622.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.

Revert "use container_commands instead of commands for update_bundler"

This reverts commit 5643d2d.

Revert "update bundler to 2.1.4 for ruby 2.5.5"

This reverts commit c1b9354.

Revert "Merge pull request #215 from cul-it/fix/missing_script_method2"

This reverts commit 7f0885c, reversing
changes made to a6c00c3.

Revert "Merge pull request #214 from cul-it/refactor/permissions_script"

This reverts commit a6c00c3, reversing
changes made to 37b1622.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.

Revert "Merge pull request #200 from cul-it/debug_stg"

This reverts commit 0863a55, reversing
changes made to 32df230.
elrayle added a commit to cul-it/exhibits-library-cornell-edu that referenced this issue Mar 3, 2020
remove refs to find_alternate_resource_for_image

The perform_pretest already lists out alternate resources for the upload_id, and the method wasn’t actually implemented.  So it was removed from the ResourceDeleteService.

update bundler to 2.1.4 for ruby 2.5.5

use container_commands instead of commands for update_bundler

Revert "use container_commands instead of commands for update_bundler"

This reverts commit 6a77206.

tmp pin of sprockets

sprockets 4 is incompatible with font-awesome 4.5.  It is compatible with font-awesome 5.12.

Ref:

FortAwesome/font-awesome-sass@b8dd32c

rails/sprockets-rails#269

rails/sprockets-rails#333

create directory before files

use relative path for logs as the script runs in the staging directory

delete sidekiq_permissions

add version to footer

Revert "Merge pull request #223 from cul-it/remove_sidekiq_perm"

This reverts commit 9a79fe9, reversing
changes made to a27bf85.

Revert "Merge pull request #221 from cul-it/remove/sidekiq_perm"

This reverts commit a27bf85, reversing
changes made to 4ec6261.

Revert "Merge pull request #220 from cul-it/tweak/sidekiq_perm"

This reverts commit 4ec6261, reversing
changes made to 2e78d3f.

Revert "Merge pull request #217 from cul-it/update/bundler"

This reverts commit 559a61d, reversing
changes made to 7f0885c.

Revert "Merge pull request #215 from cul-it/fix/missing_script_method2"

This reverts commit 7f0885c, reversing
changes made to a6c00c3.

Revert "Merge pull request #214 from cul-it/refactor/permissions_script"

This reverts commit a6c00c3, reversing
changes made to 37b1622.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.

Revert "use container_commands instead of commands for update_bundler"

This reverts commit 5643d2d.

Revert "update bundler to 2.1.4 for ruby 2.5.5"

This reverts commit c1b9354.

Revert "Merge pull request #215 from cul-it/fix/missing_script_method2"

This reverts commit 7f0885c, reversing
changes made to a6c00c3.

Revert "Merge pull request #214 from cul-it/refactor/permissions_script"

This reverts commit a6c00c3, reversing
changes made to 37b1622.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.

Revert "Merge pull request #200 from cul-it/debug_stg"

This reverts commit 0863a55, reversing
changes made to 32df230.

Revert "update bundler to 2.1.4 for ruby 2.5.5"

This reverts commit c720133.

Revert "Merge pull request #215 from cul-it/fix/missing_script_method2"

This reverts commit 7f0885c, reversing
changes made to a6c00c3.

Revert "Merge pull request #214 from cul-it/refactor/permissions_script"

This reverts commit a6c00c3, reversing
changes made to 37b1622.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.

Revert "Merge pull request #200 from cul-it/debug_stg"

This reverts commit 0863a55, reversing
changes made to 32df230.
elrayle added a commit to cul-it/exhibits-library-cornell-edu that referenced this issue Mar 3, 2020
Update footer - remove library resources links

script to chmod logs for sidekiq access

update security vulnerabilities

also updates ruby to 2.5.5

only create and chmod log for actual deploy environment

remove refs to find_alternate_resource_for_image

The perform_pretest already lists out alternate resources for the upload_id, and the method wasn’t actually implemented.  So it was removed from the ResourceDeleteService.

update bundler to 2.1.4 for ruby 2.5.5

use container_commands instead of commands for update_bundler

Revert "use container_commands instead of commands for update_bundler"

This reverts commit 6a77206.

tmp pin of sprockets

sprockets 4 is incompatible with font-awesome 4.5.  It is compatible with font-awesome 5.12.

Ref:

FortAwesome/font-awesome-sass@b8dd32c

rails/sprockets-rails#269

rails/sprockets-rails#333

create directory before files

use relative path for logs as the script runs in the staging directory

delete sidekiq_permissions

add version to footer

Revert "Merge pull request #223 from cul-it/remove_sidekiq_perm"

This reverts commit 9a79fe9, reversing
changes made to a27bf85.

Revert "Merge pull request #221 from cul-it/remove/sidekiq_perm"

This reverts commit a27bf85, reversing
changes made to 4ec6261.

Revert "Merge pull request #220 from cul-it/tweak/sidekiq_perm"

This reverts commit 4ec6261, reversing
changes made to 2e78d3f.

Revert "Merge pull request #217 from cul-it/update/bundler"

This reverts commit 559a61d, reversing
changes made to 7f0885c.

Revert "Merge pull request #215 from cul-it/fix/missing_script_method2"

This reverts commit 7f0885c, reversing
changes made to a6c00c3.

Revert "Merge pull request #214 from cul-it/refactor/permissions_script"

This reverts commit a6c00c3, reversing
changes made to 37b1622.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.

Revert "use container_commands instead of commands for update_bundler"

This reverts commit 5643d2d.

Revert "update bundler to 2.1.4 for ruby 2.5.5"

This reverts commit c1b9354.

Revert "Merge pull request #215 from cul-it/fix/missing_script_method2"

This reverts commit 7f0885c, reversing
changes made to a6c00c3.

Revert "Merge pull request #214 from cul-it/refactor/permissions_script"

This reverts commit a6c00c3, reversing
changes made to 37b1622.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.

Revert "Merge pull request #200 from cul-it/debug_stg"

This reverts commit 0863a55, reversing
changes made to 32df230.

Revert "update bundler to 2.1.4 for ruby 2.5.5"

This reverts commit c720133.

Revert "Merge pull request #215 from cul-it/fix/missing_script_method2"

This reverts commit 7f0885c, reversing
changes made to a6c00c3.

Revert "Merge pull request #214 from cul-it/refactor/permissions_script"

This reverts commit a6c00c3, reversing
changes made to 37b1622.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.

Revert "Merge pull request #200 from cul-it/debug_stg"

This reverts commit 0863a55, reversing
changes made to 32df230.

Revert "only create and chmod log for actual deploy environment"

This reverts commit 94659f3.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.
elrayle added a commit to cul-it/exhibits-library-cornell-edu that referenced this issue Mar 3, 2020
remove has_many :owned_taggings

fixes error…
`has_many :through association 'Spotlight::Exhibit#owned_tags' which goes through 'Spotlight::Exhibit#owned_taggings’`

add data integrity cleanup scripts

add instructions to start sidekiq

refine scripts that help explore data

update dependencies

Update footer - remove library resources links

script to chmod logs for sidekiq access

update security vulnerabilities

also updates ruby to 2.5.5

only create and chmod log for actual deploy environment

remove refs to find_alternate_resource_for_image

The perform_pretest already lists out alternate resources for the upload_id, and the method wasn’t actually implemented.  So it was removed from the ResourceDeleteService.

update bundler to 2.1.4 for ruby 2.5.5

use container_commands instead of commands for update_bundler

Revert "use container_commands instead of commands for update_bundler"

This reverts commit 6a77206.

tmp pin of sprockets

sprockets 4 is incompatible with font-awesome 4.5.  It is compatible with font-awesome 5.12.

Ref:

FortAwesome/font-awesome-sass@b8dd32c

rails/sprockets-rails#269

rails/sprockets-rails#333

create directory before files

use relative path for logs as the script runs in the staging directory

delete sidekiq_permissions

add version to footer

Revert "Merge pull request #223 from cul-it/remove_sidekiq_perm"

This reverts commit 9a79fe9, reversing
changes made to a27bf85.

Revert "Merge pull request #221 from cul-it/remove/sidekiq_perm"

This reverts commit a27bf85, reversing
changes made to 4ec6261.

Revert "Merge pull request #220 from cul-it/tweak/sidekiq_perm"

This reverts commit 4ec6261, reversing
changes made to 2e78d3f.

Revert "Merge pull request #217 from cul-it/update/bundler"

This reverts commit 559a61d, reversing
changes made to 7f0885c.

Revert "Merge pull request #215 from cul-it/fix/missing_script_method2"

This reverts commit 7f0885c, reversing
changes made to a6c00c3.

Revert "Merge pull request #214 from cul-it/refactor/permissions_script"

This reverts commit a6c00c3, reversing
changes made to 37b1622.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.

Revert "use container_commands instead of commands for update_bundler"

This reverts commit 5643d2d.

Revert "update bundler to 2.1.4 for ruby 2.5.5"

This reverts commit c1b9354.

Revert "Merge pull request #215 from cul-it/fix/missing_script_method2"

This reverts commit 7f0885c, reversing
changes made to a6c00c3.

Revert "Merge pull request #214 from cul-it/refactor/permissions_script"

This reverts commit a6c00c3, reversing
changes made to 37b1622.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.

Revert "Merge pull request #200 from cul-it/debug_stg"

This reverts commit 0863a55, reversing
changes made to 32df230.

Revert "update bundler to 2.1.4 for ruby 2.5.5"

This reverts commit c720133.

Revert "Merge pull request #215 from cul-it/fix/missing_script_method2"

This reverts commit 7f0885c, reversing
changes made to a6c00c3.

Revert "Merge pull request #214 from cul-it/refactor/permissions_script"

This reverts commit a6c00c3, reversing
changes made to 37b1622.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.

Revert "Merge pull request #200 from cul-it/debug_stg"

This reverts commit 0863a55, reversing
changes made to 32df230.

Revert "only create and chmod log for actual deploy environment"

This reverts commit 94659f3.

Revert "Merge pull request #212 from cul-it/update/dev_dependencies"

This reverts commit 37b1622, reversing
changes made to 1717a52.

Revert "Merge pull request #211 from cul-it/sidekiq/permissions"

This reverts commit 1717a52, reversing
changes made to 1cd0997.

Revert "Merge pull request #207 from cul-it/footer"

This reverts commit 1cd0997, reversing
changes made to 0863a55.

Revert "update dependencies"

This reverts commit fd20fe6.

Revert "refine scripts that help explore data"

This reverts commit 7cd49f7.

Revert "add instructions to start sidekiq"

This reverts commit 0236f3b.

Revert "add data integrity cleanup scripts"

This reverts commit d8bcb50.

Revert "remove has_many :owned_taggings"

This reverts commit ec9e8f4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants