- Using Netbeans 6.0, Create a Rails application WITHOUT support for WAR deployment.
- Glassfish will use the "production" part of database.yml, so make sure you have a valid configuration there.
- Install the goldspike plugin (script/plugin install http://jruby-extras.rubyforge.org/svn/trunk/rails-integration/plugins/goldspike)
- In Netbeans, refresh the rake tasks.
- Add your dependent gems in the war.rb file located in config folder (see http://wiki.jruby.org/wiki/Goldspike for more instructions on how to do that). Basically is something like:
add_gem 'activerecord-jdbcpostgresql-adapter' add_gem 'fastercsv'
- run rake->war->standalone->create from the menu.
- copy and paste the generated war file (should be in the app's root folder) into the autodeploy folder of you glassfish domain's (domains/yourdomain) folder.
- start your glassfish server.
- Navigate to your application, e.g.: http://localhost:8080/finances/categories/list.
The following Powershell script can be used to send an email alert when a file is missing from a folder or it is the same file from a previous check: $path_mask = "yourfile_*.txt" $previous_file_store = "lastfileread.txt" $script_name = "File Check" ###### Functions ########## Function EMailLog($subject, $message) { $emailTo = "juanito@yourserver.com" $emailFrom = "alert@yourserver.com" $smtpserver="smtp.yourserver.com" $smtp=new-object Net.Mail.SmtpClient($smtpServer) $smtp.Send($emailFrom, $emailTo, $subject, $message) } Try { #get files that match the mask $curr_file = dir $path_mask | select name if ($curr_file.count -gt 0) { #file found #check if the file is different from the previous file read $previous_file = Get-Content $previous_file_store $curr_file_name = $curr_file.Item(0).Name if ($
Comments