fix error
This commit is contained in:
parent
5042f7cd43
commit
e5ae451eb7
|
@ -163,7 +163,7 @@ if bundle_update_flag
|
||||||
r = open("#{env_pwd}/config/environment.rb",'r'){|f| f.read()}
|
r = open("#{env_pwd}/config/environment.rb",'r'){|f| f.read()}
|
||||||
secret_key = r.scan(/Orbit::Application\.config\.secret_key_base = '(.*)'/).flatten[0] rescue nil
|
secret_key = r.scan(/Orbit::Application\.config\.secret_key_base = '(.*)'/).flatten[0] rescue nil
|
||||||
if !secret_key.nil?
|
if !secret_key.nil?
|
||||||
open("#{env_pwd}/config/secrets.yml",'r+') do |f|
|
open("#{env_pwd}/config/secrets.yml",'w+') do |f|
|
||||||
c = {"production"=> {"secret_key_base"=> secret_key},"development"=> {"secret_key_base"=> secret_key}}.to_yaml.sub("---\n",'')
|
c = {"production"=> {"secret_key_base"=> secret_key},"development"=> {"secret_key_base"=> secret_key}}.to_yaml.sub("---\n",'')
|
||||||
f.write(c)
|
f.write(c)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue