# Rebuild fails on 'bundle exec rake themes:update assets:precompile'

**URL:** https://meta.discourse.org/t/rebuild-fails-on-bundle-exec-rake-themes-update-assets-precompile/241044
**Category:** Support
**Created:** [October 5, 2022, 4:46pm UTC](https://meta.discourse.org/t/rebuild-fails-on-bundle-exec-rake-themes-update-assets-precompile/241044 "2022-10-05T16:46:18Z")
**Posts on this page:** 9
**Page:** 2

<div class="post-metadata">

### Author: ![crcoli7307](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/crcoli7307/32/267901_2.png) [@crcoli7307](https://meta.discourse.org/u/crcoli7307)
#### Post date: [October 5, 2022, 6:44pm UTC](https://meta.discourse.org/t/rebuild-fails-on-bundle-exec-rake-themes-update-assets-precompile/241044/23 "2022-10-05T18:44:09Z")

</div>

Turns out commenting the maxmind key fixed it, not sure what caused it.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 5, 2022, 6:51pm UTC](https://meta.discourse.org/t/rebuild-fails-on-bundle-exec-rake-themes-update-assets-precompile/241044/24 "2022-10-05T18:51:02Z")

</div>

Here is the error, which I found in the discourse-doctor dump:

```plaintext

Compressing: discourse-2a3fa79227edc060cacfac4f6331c3d7917970c2430d65e196751dc69d2c371e.js
gzip -f -c -9 /var/www/discourse/public/assets/discourse-2a3fa79227edc060cacfac4f6331c3d7917970c2430d65e196751dc69d2c371e.js > /var/www/discourse/public/assets/discourse-2a3fa79227edc060cacfac4f6331c3d7917970c2430d65e196751dc69d2c371e.js.gz
****************************************************************************************************
#<Thread:0x0000556a3c8d7f60 /var/www/discourse/lib/tasks/assets.rake:265 run> terminated with exception (report_on_exception is true):
/var/www/discourse/lib/tasks/assets.rake:277:in `rescue in block (2 levels) in <main>': undefined local variable or method `name' for main:Object (NameError)
	from /var/www/discourse/lib/tasks/assets.rake:266:in `block (2 levels) in <main>'
/var/www/discourse/lib/file_helper.rb:76:in `block in download': 401 Error (OpenURI::HTTPError)
	from /var/www/discourse/lib/final_destination.rb:515:in `block (3 levels) in safe_get'
	from /var/www/discourse/lib/final_destination.rb:514:in `catch'
	from /var/www/discourse/lib/final_destination.rb:514:in `block (2 levels) in safe_get'
	from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/net-http-0.2.2/lib/net/http.rb:1626:in `block in transport_request'
	from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/net-http-0.2.2/lib/net/http/response.rb:185:in `reading_body'
	from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/net-http-0.2.2/lib/net/http.rb:1625:in `transport_request'
	from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/net-http-0.2.2/lib/net/http.rb:1579:in `request'
	from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rack-mini-profiler-3.0.0/lib/patches/net_patches.rb:19:in `block in request_with_mini_profiler'
	from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rack-mini-profiler-3.0.0/lib/mini_profiler/profiling_methods.rb:46:in `step'
	from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rack-mini-profiler-3.0.0/lib/patches/net_patches.rb:18:in `request_with_mini_profiler'
	from /var/www/discourse/lib/final_destination.rb:475:in `block in safe_get'
	from /var/www/discourse/lib/final_destination.rb:535:in `block in safe_session'
	from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/net-http-0.2.2/lib/net/http.rb:985:in `start'
	from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/net-http-0.2.2/lib/net/http.rb:628:in `start'
	from /var/www/discourse/lib/final_destination.rb:533:in `safe_session'
	from /var/www/discourse/lib/final_destination.rb:467:in `safe_get'
	from /var/www/discourse/lib/final_destination.rb:149:in `get'
	from /var/www/discourse/lib/file_helper.rb:68:in `download'
	from /var/www/discourse/lib/discourse_ip_info.rb:39:in `mmdb_download'
	from /var/www/discourse/lib/tasks/assets.rake:268:in `block (3 levels) in <main>'
	from /var/www/discourse/lib/tasks/assets.rake:267:in `each'
	from /var/www/discourse/lib/tasks/assets.rake:267:in `block (2 levels) in <main>'

```

---

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [October 5, 2022, 6:51pm UTC](https://meta.discourse.org/t/rebuild-fails-on-bundle-exec-rake-themes-update-assets-precompile/241044/25 "2022-10-05T18:51:54Z")

</div>

Removing my MaxMknd key fixed it, what does that mean?

---

<div class="post-metadata">

### Author: ![crcoli7307](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/crcoli7307/32/267901_2.png) [@crcoli7307](https://meta.discourse.org/u/crcoli7307)
#### Post date: [October 5, 2022, 7:07pm UTC](https://meta.discourse.org/t/rebuild-fails-on-bundle-exec-rake-themes-update-assets-precompile/241044/26 "2022-10-05T19:07:57Z")

</div>

Soo how can we fix that?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 5, 2022, 7:10pm UTC](https://meta.discourse.org/t/rebuild-fails-on-bundle-exec-rake-themes-update-assets-precompile/241044/27 "2022-10-05T19:10:20Z")

</div>

> [@crcoli7307](#):
>
> Soo how can we fix that?

If I knew, I’d have provided that info!

> [@pfaffman](#):
>
> ```plaintext
> /var/www/discourse/lib/file_helper.rb:76:in `block in download': 401 Error (OpenURI::HTTPError)
> 
> ```

It looks like something is trying to pull something from somewhere and can’t. 🤷

---

<div class="post-metadata">

### Author: ![crcoli7307](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/crcoli7307/32/267901_2.png) [@crcoli7307](https://meta.discourse.org/u/crcoli7307)
#### Post date: [October 5, 2022, 7:11pm UTC](https://meta.discourse.org/t/rebuild-fails-on-bundle-exec-rake-themes-update-assets-precompile/241044/28 "2022-10-05T19:11:18Z")

</div>

Ah it seems @darkpixlz gave me a wrong api key…

---

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [October 5, 2022, 7:11pm UTC](https://meta.discourse.org/t/rebuild-fails-on-bundle-exec-rake-themes-update-assets-precompile/241044/29 "2022-10-05T19:11:41Z")

</div>

I gave you what MaxMind gave me. I’ll look into it when I’m home.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 5, 2022, 7:14pm UTC](https://meta.discourse.org/t/rebuild-fails-on-bundle-exec-rake-themes-update-assets-precompile/241044/30 "2022-10-05T19:14:57Z")

</div>

Ah. Yes. That explains it. It’s trying to pull from maxind.

A more helpful error message would help.

> [@darkpixlz](#):
>
> Removing my MaxMknd key fixed it, what does that mean?

It means that I should have stopped paying attention to this topic when you wrote that.

---

<div class="post-metadata">

### Author: ![darkpixlz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/darkpixlz/32/549896_2.png) [@darkpixlz](https://meta.discourse.org/u/darkpixlz)
#### Post date: [October 5, 2022, 7:16pm UTC](https://meta.discourse.org/t/rebuild-fails-on-bundle-exec-rake-themes-update-assets-precompile/241044/31 "2022-10-05T19:16:02Z")

</div>

I will look into it as I said. It could have been from the wrong service because I did it on my phone

[Previous page](https://meta.discourse.org/t/rebuild-fails-on-bundle-exec-rake-themes-update-assets-precompile/241044.md?page=1)
