net::ERR_NAME_NOT_RESOLVED for rendering a simple form with css/js

Hello again,
I have an issue rendering assets for a view.

So i’m currently rendering in one of my jets endpoints a simple form with some css and js, it works correctly locally. However, when I deploy it renders the form without any of those assets (js, icons, css).
The console shows the error net::ERR_NAME_NOT_RESOLVED for each url that points to S3, where the assets are in fact located.

Tried making those assets public but still it cannot find them. Am I missing something?

I see that the url it’s trying to build does not match the public url in s3. Maybe I need to configure something.

Ill try editing this config, which is in the application.rb:

# config.assets.base_url = nil

setting the url there.

update:
No luck yet after tickering the configs.

Try upgrading jets.

Sounds like the same issue someone else ran in https://gitter.im/tongueroo/jets a few days ago. For that case it was because the app was in us-east-1 and the s3 base url for us-east-1 is a special case. It was fixed in this PR https://github.com/tongueroo/jets/pull/150 So wondering if it’s the same case and upgrading jets will fix it.

Here’s also the Jets Upgrading docs. Essentially:

bundle update # to upgrade jets
jets upgrade # might need to or not depending on the version
1 Like

Might be also helpful to view the html source and find out what the https s3 url that is being used. Here’s an example from the html source of the demo app https://demo.rubyonjets.com/posts

Correct, after upgrading bundle and jets it worked.
Thanks again.

1 Like