Can you post what you have in routes.rb? If the logs show RoutingError
it’s most likely a bug in there (although I have no idea why it would
work on your local machine if that’s the case).
Even I’m not sure why its working on my local machine and not on heroku.
But I don’t think it has something to do with my routes.rb file because
it is not able to find an asset which was placed in my assets/videos
folder and then precompiled.
After trying so many things I did the following
In my production.rb file I had config.assets.compile = false, and I
changed its value to true. Now video is loading.
I don’t know what will be the implications of changing its value from
false to true, but it seems to work. Not only video the whole
application.
I want to know if there will be any consequences for changing its value
from false to true like load time or any other.
That is a bit odd as video_tag should accept two args. That sort of
issue may mean that the error is not actually where it seems to be.
Try fiddling with the video_tag line to get some clues. Take it out,
change it to just one arg, and so on find out what the real problem
is.
Tried many combinations with video_tag. Still it shows the same error.
Please quote the previous message when replying, otherwise it is
difficult to follow the thread, this is a mailing list not a forum
(though you may be using it via a forum like interface). Thanks.
Does the error disappear if you remove that line entirely? What if
you move it to a completely different part of the view? What happens
if you call video_tag with no parameters at all? What if you put a
different helper such as field_tag in that line instead.
Does the error only appear if you include the gem
sprockets_better_errors?
Tried many combinations with video_tag. Still it shows the same error.
Even when you switch it to one arg? I don’t see how that’s possible
considering the error seems to think that’s the number of arguments you
should have.
Tried many combinations with video_tag. Still it shows the same error.
Please quote the previous message when replying, otherwise it is
difficult to follow the thread, this is a mailing list not a forum
(though you may be using it via a forum like interface). Thanks.
Does the error disappear if you remove that line entirely? What if
you move it to a completely different part of the view? What happens
if you call video_tag with no parameters at all? What if you put a
different helper such as field_tag in that line instead.
Does the error only appear if you include the gem
sprockets_better_errors?
Which versions of ruby and rails are you using?
Colin
Sorry Colin. I did not know I have to use previous message when
replying. I was using it as a forum. Will do it from now.
Coming to my version I’m Ruby 2.2.2p95 and Rails 4.2.0.
That error is behaving very different. It showed the same error when I
replaced it with image_tag. When I removed it completely it moved to my
next image_tag. When I removed all my image_tags from my landing page it
showed the same error at
“<%= stylesheet_link_tag “application”, media: “all”,
“data-turbolinks-track” => true %>”
It is showing the error only when I include the sprockets_better_errors
gem. Now I’ve removed it and everything works fine.
But my my initial problem still exists. Video not loading on heroku. its
working only if I change “config.assets.compile” value to true in my
production.rb file.
So now I’m unsure if it will have any other affect on my application
like slowing it down…etc.
Tried many combinations with video_tag. Still it shows the same error.
Even when you switch it to one arg? I don’t see how that’s possible
considering the error seems to think that’s the number of arguments you
should have.
Hi Justin,
Even I don’t understand it. It is showing this kind of behavior only if
I include “sprockets_better_errors” gem. Else its working fine.
But changing “config.assets.compile” to true in production.rb file have
any affect on my application?
I am not an expert in that area, nor in Heroku. Have you determined
whether it is a Heroku issue or a production environment issue? If
not then try running it locally but in production mode and see what
happens.