model/application.rb in ruby-station-0.1.2 vs model/application.rb in ruby-station-0.1.3

- old
+ new

@@ -9,16 +9,19 @@ def start return if self.pid cmd = [ + gem_env(), Conf.ruby_command, script_path, "--port", self.port.to_s, "--data-dir", data_dir, ].join(" ") + Ramaze::Log.info "starting app: #{cmd}" + self.pid = Servant.watch(cmd){ stopped } self.save end @@ -46,9 +49,13 @@ full_name, "main.rb") end def data_dir File.join(Conf.data_dir, full_name) + end + + def gem_env + "GEM_HOME='#{Conf.gem_dir}'" end end DataMapper.auto_upgrade! Application.all.each{|a| a.update_attributes(:pid => nil)}