- 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 will convert a batch of JPEG files to TIFF format: #This Code is released under MIT license [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing") $files_folder = 'C:\path-where-your-jpg-files-are\' $pdfs = get-childitem $files_folder -recurse | where {$_.Extension -match "jpg"} foreach($pdf in $pdfs) { $picture = [System.Drawing.Bitmap]::FromFile( $pdf.FullName ) $tiff = $pdf.FullName.replace('.PDF','').replace('.pdf','').replace('.jpg','').replace('.JPG','') + '.tiff' $picture.Save($tiff) }
Comments