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

ActionView::Template::Error undefined method service_name #55

Closed
x1wins opened this issue Aug 26, 2021 · 1 comment
Closed

ActionView::Template::Error undefined method service_name #55

x1wins opened this issue Aug 26, 2021 · 1 comment
Assignees
Labels
dependencies Pull requests that update a dependency file rails 6.1 rails version upgrade system-error

Comments

@x1wins
Copy link
Owner

x1wins commented Aug 26, 2021

web_1      | ActionView::Template::Error (undefined method `service_name' for #<ActiveStorage::Blob:0x00007fdc02de2e08>):
web_1      |     19:     </tr>
web_1      |     20:     </thead>
web_1      |     21:     <tbody>
web_1      |     22:     <% @encodes.each do |encode| %>
web_1      |     23:       <tr id="encode_id" data-encode-id="<%= encode.id %>">
web_1      |     24:         <th><%= encode.id %></th>
web_1      |     25:         <td><%= encode.title %></td>
web_1      |   
web_1      | app/views/encodes/index.html.erb:22
web_1      | Started GET "/encodes?page=2" for 172.19.0.1 at 2021-08-26 05:23:26 +0000
web_1      | Cannot render console from 172.19.0.1! Allowed networks: 127.0.0.0/127.255.255.255, ::1
web_1      | Processing by EncodesController#index as HTML
web_1      |   Parameters: {"page"=>"2"}
web_1      |   User Load (0.6ms)  SELECT "users".* FROM "users" WHERE "users"."id" = $1 ORDER BY "users"."id" ASC LIMIT $2  [["id", 1], ["LIMIT", 1]]
web_1      |   Rendering layout layouts/application.html.erb
web_1      |   Rendering encodes/index.html.erb within layouts/application
web_1      |   Encode Load (2.1ms)  SELECT "encodes".* FROM "encodes" WHERE "encodes"."published" = $1 ORDER BY id DESC LIMIT $2 OFFSET $3  [["published", true], ["LIMIT", 20], ["OFFSET", 20]]
web_1      |   ↳ app/views/encodes/index.html.erb:22
web_1      |   ActiveStorage::Attachment Load (0.8ms)  SELECT "active_storage_attachments".* FROM "active_storage_attachments" WHERE "active_storage_attachments"."record_type" = $1 AND "active_storage_attachments"."name" = $2 AND "active_storage_attachments"."record_id" IN ($3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22)  [["record_type", "Encode"], ["name", "file"], ["record_id", 320], ["record_id", 319], ["record_id", 318], ["record_id", 317], ["record_id", 316], ["record_id", 315], ["record_id", 314], ["record_id", 313], ["record_id", 312], ["record_id", 311], ["record_id", 310], ["record_id", 309], ["record_id", 308], ["record_id", 307], ["record_id", 306], ["record_id", 305], ["record_id", 304], ["record_id", 303], ["record_id", 302], ["record_id", 301]]
web_1      |   ↳ app/views/encodes/index.html.erb:22
web_1      |   ActiveStorage::Blob Load (0.7ms)  SELECT "active_storage_blobs".* FROM "active_storage_blobs" WHERE "active_storage_blobs"."id" IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20)  [["id", 2681], ["id", 2692], ["id", 2703], ["id", 2714], ["id", 2725], ["id", 2737], ["id", 2738], ["id", 2749], ["id", 2760], ["id", 2771], ["id", 2781], ["id", 2786], ["id", 2793], ["id", 2815], ["id", 2826], ["id", 2834], ["id", 2848], ["id", 2859], ["id", 2870], ["id", 2881]]
web_1      |   ↳ app/views/encodes/index.html.erb:22
web_1      |   Rendered encodes/index.html.erb within layouts/application (Duration: 17.7ms | Allocations: 5023)
web_1      |   Rendered layout layouts/application.html.erb (Duration: 20.2ms | Allocations: 5094)
web_1      | Completed 500 Internal Server Error in 29ms (ActiveRecord: 4.2ms | Allocations: 6795)
web_1      | 
web_1      | 
web_1      |   
web_1      | ActionView::Template::Error (undefined method `service_name' for #<ActiveStorage::Blob:0x00007fdc02f4ba88>):
web_1      |     19:     </tr>
web_1      |     20:     </thead>
web_1      |     21:     <tbody>
web_1      |     22:     <% @encodes.each do |encode| %>
web_1      |     23:       <tr id="encode_id" data-encode-id="<%= encode.id %>">
web_1      |     24:         <th><%= encode.id %></th>
web_1      |     25:         <td><%= encode.title %></td>
web_1      |   
web_1      | app/views/encodes/index.html.erb:22

image

@x1wins x1wins added dependencies Pull requests that update a dependency file system-error labels Aug 26, 2021
@x1wins x1wins self-assigned this Aug 26, 2021
@x1wins
Copy link
Owner Author

x1wins commented Aug 26, 2021

Solution

# docker-compose run --no-deps web bundle exec rails active_storage:update
# docker-compose run --no-deps web bundle exec rails db:migrate RAILS_ENV=development

https://stackoverflow.com/a/65499646/1399891

@x1wins x1wins closed this as completed Aug 26, 2021
@x1wins x1wins added the rails 6.1 rails version upgrade label Aug 26, 2021
x1wins added a commit that referenced this issue Aug 26, 2021
cool1209 pushed a commit to cool1209/cw_ovp that referenced this issue Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rails 6.1 rails version upgrade system-error
Projects
None yet
Development

No branches or pull requests

1 participant