diff --git a/patchfile.gemspec b/patchfile.gemspec
index f8fe01f..c7a8702 100644
--- a/patchfile.gemspec
+++ b/patchfile.gemspec
@@ -14,21 +14,19 @@ end
#Add patchfile to Admin area
@patchfile_li = File.read(app_path+"/patchfile_li.txt")
@patchfile_li_choices = File.read(app_path+"/patchfile_li_choices.txt")
-Dir.chdir(ENV['PWD']+'/app/views/shared') do
- @file_text = File.read("_side_bar.html.erb")
- if !@file_text.include?('
')
- @indert_index = @file_text.index('')
- @file_text.insert(@indert_index , @patchfile_li_choices)
- end
- if !@file_text.include?('patchfile_li')
- @indert_index = @file_text.index('
')
- @file_text.insert(@indert_index , @patchfile_li)
- end
- f = File.open('_side_bar.html.erb','w')
- f.write(@file_text)
- f.close
- puts "finish change patchfile in #{ENV['PWD']}/app/views/shared"
+@file_text = File.read(ENV['PWD']+'/app/views/shared/_side_bar.html.erb")
+if !@file_text.include?('')
+ @indert_index = @file_text.index('')
+ @file_text.insert(@indert_index , @patchfile_li_choices)
end
+if !@file_text.include?('patchfile_li')
+ @indert_index = @file_text.index('
')
+ @file_text.insert(@indert_index , @patchfile_li)
+end
+f = File.open(ENV['PWD']+'/app/views/shared/_side_bar.html.erb','w')
+f.write(@file_text)
+f.close
+puts "finish change patchfile in #{ENV['PWD']}/app/views/shared"
# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "patchfile"