Pregunta

I have a strange problem. I'm running a rails server local, everything works great. But when I tried to clone the rails server in a cloud server (amazon aws), one controller don't work.

I'm kind of newbie in rails, but I can't realize whats going on. I have some other entities working, but this one doesnt.

when I try to get /ingressos:

Showing /home/ubuntu/bilheteria_mobile_server/app/views/ingressos/index.html.erb where line #14 raised:

undefined method `each' for nil:NilClass
Extracted source (around line #14):

11:     <th></th>
12:   </tr>
13: 
14: <% @ingressos.each do |ingresso| %>
15:   <tr>
16:     <td><%= ingresso.usuario.nome %></td>
17:     <td><%= ingresso.conteudo.titulo %></td>
Rails.root: /home/ubuntu/bilheteria_mobile_server

I know that my Ingresso is getting nil, but what this can be? If in my local server I can run everything?

Anyone can give me a hint? Thanks!

edit:

For NO reason it become to works! Ok, the error has changed, it appears:

Erro loading Base64 when I use: require 'Base64'. But I need this to do somethings later, on create. How can I load Base64? Has any diference that my cloud server is a linux machine and my local server is on a mac?

thx!

¿Fue útil?

Solución

As I said in the comments, changing require "Base64" to require "base64" has solved my problem. The first error disappeared, which is weird, but I'll not complain about this. Thanks to the guys who tried to resolve the issue with me in the comment session. cya

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top