0

I am running rails 6, and I have an application is working fine on my local, but when I tried to update the new version to the remote (railway), it doesn't build.

I've been in this issue for very long time, I've tried many work arounds, such as adding /assets/

I am getting the following error:

"ActionView::Template::Error (The asset "icons.css" is not present in the asset pipeline."

Following is my deploy log, some print screens and what I've tried already

[2023-02-10T19:39:55.261020 #1]  INFO -- : [bf97bf74-3cf5-4085-a60a-4194f1935b1e] Completed 500 Internal Server Error in 1206ms (ActiveRecord: 92.9ms | Allocations: 59127)
F, [2023-02-10T19:39:55.262199 #1] FATAL -- : [bf97bf74-3cf5-4085-a60a-4194f1935b1e]
[bf97bf74-3cf5-4085-a60a-4194f1935b1e] ActionView::Template::Error (The asset "icons.css" is not present in the asset pipeline.
):
[bf97bf74-3cf5-4085-a60a-4194f1935b1e]     30:       <meta name="twitter:creator" content="">
[bf97bf74-3cf5-4085-a60a-4194f1935b1e]     31:       <meta name="twitter:image:src" content="<%= @trip && @trip.try(:id) && @trip.avatar.attached? ? @trip.try(:id) && @trip.try(:avatar).try(:service_url) : "#{get_site_image}" %>">
[bf97bf74-3cf5-4085-a60a-4194f1935b1e]     32:
[bf97bf74-3cf5-4085-a60a-4194f1935b1e]     33:       <%= stylesheet_link_tag "icons.css", "data-turbo-track": "reload" %>
[bf97bf74-3cf5-4085-a60a-4194f1935b1e]     34:       <%= stylesheet_link_tag "tooltipster.css", "data-turbo-track": "reload" %>
[bf97bf74-3cf5-4085-a60a-4194f1935b1e]     35:       <%= stylesheet_link_tag "tooltipster-light.css", "data-turbo-track": "reload" %>
[bf97bf74-3cf5-4085-a60a-4194f1935b1e]     36:       <%= stylesheet_link_tag "animations.css", "data-turbo-track": "reload" %>
[bf97bf74-3cf5-4085-a60a-4194f1935b1e]
[bf97bf74-3cf5-4085-a60a-4194f1935b1e] app/views/layouts/application.html.erb:33

here is my application file: first part app file second part app file

here is my package file: package file

here us my webpack.yml file webpack.yml

it runs locally fine, not on remote!

I've tried many many things:

  • recompiling with rake assets:precompile

  • adding /assets/ from line 33 to 58

  • removing line 59 "<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %> "

  • Got many message errors from line 90 onwards "ActionController::RoutingError (No route matches [GET] "/assets/javascript/plugins/custom_onepage.js"): [ac8248e6-f859-4969-9b54-9368bc3999cb]" so I cleared with rake assets:clobber

  • When I've done that, I start to get "ActionController::RoutingError (No route matches [GET] "/assets/font-awesome.min.css")" for every single line i've added /assets/ in the beginning

  • Tried to remove the /assets/ and recompile again, still not working and I got stuck again on line 33.

does anyone know how can find an workaround? I've tried many things and I been stuck for 4 days

  • In localhost the file shows when you enter in this routes: `localhost:3000/assets/icons.css`? – Pedro Augusto Ramalho Duarte Feb 11 '23 at 15:14
  • Do you have updated any gem? – Pedro Augusto Ramalho Duarte Feb 11 '23 at 15:15
  • Hi @PedroAugustoRamalhoDuarte, I haven't updated any gem, just tried to remove and reinstall webpack due to the current mistake. Not sure if related, but on the cloud, I get [this error](https://files.slack.com/files-pri/T02NE0241-F04NS9ECK2B/image.png) and locally when I run the webpacker-web-dev server, it builds the manifest to the public folder [webpack-dev-server](https://files.slack.com/files-tmb/T02NE0241-F04P6MUFRPD-831c5ce949/image_720.png) Do you think is anything related to it? – Fernando Nahat Jardim Feb 12 '23 at 20:14
  • Hi @PedroAugustoRamalhoDuarte, I haven't updated any gem, just tried to remove and reinstall webpack due to the current mistake. at /app/node_modules/babel-loader/lib/index.js:59:103 { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' } Do you think it may be related? – Fernando Nahat Jardim Feb 12 '23 at 21:13
  • Hi! Can you [please read](https://meta.stackoverflow.com/a/285557/15405732) about the problems with images of text and then edit your question to add transcriptions of your images of text as actual text? Perhaps useful: [editing help](https://stackoverflow.com/editing-help). – Koedlt Feb 13 '23 at 18:14
  • Hi @Koedlt, at the very beginning I had everything as a text file, but I couldn't post it, as Stack Overflow was tagging the post as "spam". (maybe because it made the post very big). So the way to accept the text was through images. – Fernando Nahat Jardim Feb 20 '23 at 14:30
  • Hmm really? It seems like the code you added in your pictures is not that gigantic, so the flagging as spam might be a different reason.. In general, for the quality of this website it's always MUCH better to print the actual text then images. Thanks a lot for answering! :) – Koedlt Feb 21 '23 at 11:27

1 Answers1

0

So I was using railway, and I've tried to start the building proccess by adding the command NODE_OPTIONS --openssl-legacy-provider, but although having set this command to start building it, it hasn't sorted any effect.

So after reading loads of threads and tried almost everything, I find out that I had to add that as an env from my project NODE_OPTIONS=openssl-legacy-provider then I've got everything working.