similar to: File I/O with rjb

Displaying 20 results from an estimated 8000 matches similar to: "File I/O with rjb"

2007 Mar 05
2
Help with rjb
I am trying to do file i/o with rails and rjb and can''t figure out a way to make this work. Here''s what I am trying to do: - a user uploads an image to the server via a standard html form: <%= file_field("blog", "attach") %> - this returns a ruby File object to the controller in params[:blog][:attach]
2011 Dec 09
1
Issue installing rjb, could not create MakeFile
Hello, I''m having some problems when try to install rjb i get this message C:\Users\PC1090\Documents\RJB\rjb-1.3.8>ruby setup.rb config ---> bin <--- bin ---> lib <--- lib ---> ext C:/Ruby187/Ruby1.8.7/bin/ruby "C:/Users/PC1090/Documents/RJB/rjb-1.3.8/ext/extconf.rb" checking for jni.h... no *** C:/Users/PC1090/Documents/RJB/rjb-1.3.8/ext/extconf.rb failed
2011 Feb 10
3
Using RJB in a Rails 3 app?
I''m trying to interact with a java library (Aspose Slides) inside of my Rails 3 app. I''m trying to get the rjb gem installed but I keep running into the same error when I try to start the app: [BUG] cross-thread violation on rb_gc() (null) Abort trap I''m on OSX 10.6.6, running ruby 1.8.7-p174 (via RVM) and Rails 3.0.4. I tried a couple of methods for getting this
2009 Sep 28
3
rjb: Java classes in Rails
Hi, For those who might not be aware, rjb is a killer gem for using java classes inside your rails app (or any ruby code). Check it out at: http://rubyforge.org/projects/rjb/ I was able to successfully use it in one of my apps that required some code that is only available in java. And it''s much nicer than having to compile a java app, then shell out using backticks, get back the return
2008 Feb 27
1
RJB Not Working?
Heya all -- I recently downloaded the RJB 1.1.1 gem, and the install seemed to go fine. However, when I try to require ''rjb'' I get the following error: no such file to load -- rjb Has anyone seen this before? Any thoughts what it could be? Thanks so much! -Lucas -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this
2006 Oct 30
2
RJB in Rails - setting JAVA_HOME correctly in environment.rb
All, I am attempting to use RJB (Java-Ruby Bridge - see: http://arton.no-ip.info/collabo/backyard/?RubyJavaBridge) in my Rails app. The documentation says: "Both LD_LIBRARY_PATH and JAVA_HOME setting required in environment.rb file of RoR." However, it doesn''t say _how_ to set these variables in environment.rb. I''ve tried JAVA_HOME =
2009 Sep 30
0
rjb failure: can't create Java VM
Help! On my Mac dev machine, everything works, and obviously on my Debian production server something is wrong. I set JAVA_HOME and LD_LIBRARY_PATH in environment.rb, but it''s still blocked. Anyone has experience with rjb? -- Posted via http://www.ruby-forum.com/.
2009 May 25
2
Looping through java hashmap from ruby through rjb
Greetings. I am trying to list all keys in a java.util.HashMap field. The Java code to do this looks like: # Collection c = hMap.values(); # # //obtain an Iterator for Collection # Iterator itr = c.iterator(); # # //iterate through HashMap values iterator # while(itr.hasNext()) System.out.println(itr.next()); So, I took a stab at the ruby version: # I have a java hashmap called fields
2007 Apr 27
2
Jarque-Bera and rnorm()
Folks, I'm a bit puzzled by the fact that if I generate 100,000 standard normal variates using rnorm() and perform the Jarque-Bera on the resulting vector, I get p-values that vary drastically from run to run. Is this expected? Surely the p-val should be close to 1 for each test? Are 100,000 variates sufficient for this test? Or is it that rnorm() is not a robust random number generator?
2007 Feb 23
2
cluster with environment variables
In production I''ve setup a mongrel cluster of 2 servers. Now I''m using RJB(ruby java bridge). So I need certain java environment variables set before mongrel starts. So I set them: export LD_LIBRARY_PATH=/usr/java/jdk1.6.0/jre/lib/i386/:/usr/java/jdk1.6.0/jre/lib/i386/client/:./ export JAVA_HOME=/usr/java/jdk1.6.0/ Then I run "mongrel_rails cluster::start". Now
2013 Sep 26
2
Read shortcuts of MS Excel files through R
Dear Rxperts, Through Windows OS, I created shortcuts (paste as shortcut) to excel spreadsheets ( with "xlsx" as the file extension). I wasn't able to read the shortcuts through R and using "read" functions of "xlsx" package. exf <- "a1.xlsx.lnk" > read.xlsx(exf,1) Error in .jcall("RJavaTools", "Ljava/lang/Object;",
2006 Mar 29
1
Posting multiple files - how to set up params correctly
All, I have a page where I am allowing the user to specify multiple image files that are related to one HTML document. I want to end up with an array of image files that I can then assign into an array within the controller. I''m trying to set up my file_field correctly but am having trouble. I''m not clear on how "the multiple input tags with the same name turning into
2008 Jul 14
1
about string error for upload file in rails 2.1
hello: I have code for upload image file to server file system.This works in rails 1.2.3.But in rails 2.1,it gets an error. The following is the important code: In a view: <%form_for :user,:url=>{:action=>"register"},:html=>{:multipart=>true} do |f|-%> <p> <label>照片</label> <%=f.file_field "file"-%> </p>
2009 Jun 29
2
java application with db2 fail with:A communication error ..
I am new user of wine. I have centos 2.6.18-128.el5 x86_64 GNU/Linux and wine-1.0.1. I installed jre for windows in wine and run .bat program that run a java SWT application taht access a database db2. After running for a few moments an error is generated, this error occurs only under wine. DB2 use port 50000. Application.commit Text : [ibm][db2][jcc][t4][2030][11211] A communication
2004 Aug 06
0
q about jspeex
Hi, i changed the read method after constructing a pipedinputstream/opipedoutputstream to int n=auin.read(frame, 0, frame.length); System.out.println(""+n+" bytes read."); pout.write(frame); int m=pcm2speex.read(); System.out.println("something
2010 Jun 26
0
Down Convertion from 32Khz to 16Khz
I've done something similar in Groovy/Java using Wave files. In my case I was downsampling from 16bit to 8bit. Here's the core of my conversion logic. def convertData(def inputStream, def outputStream) { boolean otherByte = false inputStream.eachByte { if(otherByte) { //invert high order byte int inverted = ((int)it) ^ 0x00000080 byte[]
2010 Sep 20
0
file_field
At: http://www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm You can find: <%= file_field ''upload'', ''datafile'' %> I saw the file_field documentation from here: http://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html#method-i-file_field But, still cannot get how the parameters ''upload'' and
2006 Apr 01
0
Many file fields w/same name don''t show up as params array
All, I have a page where I am allowing the user to specify multiple image files that are related to one HTML document. I''m trying to set up my file_field correctly but am having trouble. I''m trying to post into an array of images that belongs to a document. I''ve tried: <%= file_field(''document'', ''image[]'') %> <%=
2006 Mar 06
1
Uploaded File to Database
Hi, I currently write a tool for my school. Therefore I have to save uploaded files. I bought Agile Web Dev. with Rails to learn webdev with Rails. I''m very new at rails and couln''d find anything on the internet. Now when I want to save the file data to the mysql database, rails gives me an error. My code is the same as written in the book on page 363. Here is my code of the
2004 Aug 06
0
q about jspeex
Hi, It would appear the the 'pcm2speex.read(frame, 0, frame.length)' is blocking which means that it is waiting for data from the underlying inputstream (i.e.AudioInputStream(t.input)). If it could read sufficient data it would transcode it. If it recieved an EOF, it should do some zero padding and then transcode it. Are you sure that you are receiving data from the underlying