bucket and @bucket are two different variables.

The main change in ERB templates between 2.7 and 3.x was deprecating the
use of non-class variables to pass information from the calling scope into
the template. Perhaps you got a little over-zealous prepending '@' to
variable names while fixing deprecation warnings?


On Fri, May 30, 2014 at 2:48 PM, Eugene Brodsky <[email protected]>
wrote:

> I should clarify: this is supposed to actually set a value to another
> variable that's used elsewhere in the template, e.g.:
>
> <% case @environment
> when "production"
>         bucket = "foo.path"
> else
>         bucket = "bar.path"
> end -%>
>
> rewrite ^/images$ http://s3.amazonaws.com/<%= @bucket %>;
>
> etc.
>
> This is very simple Ruby code which I would expect to just execute, and it
> did work this way in 2.7, but if something did change from 2.7 to 3.x in
> how Ruby within ERB templates is being handled, I can't find any reference
> to it...
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/d13e9bb9-f63a-4d4f-98e6-efb170e90516%40googlegroups.com
> <https://groups.google.com/d/msgid/puppet-users/d13e9bb9-f63a-4d4f-98e6-efb170e90516%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAELFvU%3DQb7vHZZ2NAsoXqjhcPYxeidnXpTOdtwH_grpMhS-Aeg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to