How to remove trailing symbol for a constant in Rails initializer?
Posted
by Andrei
on Stack Overflow
See other posts from Stack Overflow
or by Andrei
Published on 2010-05-01T16:48:03Z
Indexed on
2010/05/01
16:57 UTC
Read the original article
Hit count: 292
How does one remove trailing character correctly in the following sentence if it's in config/environment.rb
file.
KEY = ENV['KEY'].delete "\r"
It produces the following error:
undefined method `delete' for nil:NilClass (NoMethodError)
It works well in IRB, but not in environment.rb
© Stack Overflow or respective owner