Displaying 20 results from an estimated 300 matches similar to: "Using RJB in a Rails 3 app?"
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
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
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
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
2007 Nov 21
1
iText, Rails, and OS X
I have the need to take existing PDFs and populate them with data
entered via HTML forms. Data saved to database, entered in to PDF
file, PDF file with data archived, and then distributed va email and/
or download.
The languuage I previous did all my web work in, Lasso, had this
stuff built in, but it appears not to be so with Ruby or Rails.
The latest info I can find on this is a year
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]
2008 Jul 05
18
Java Bridge Itext Example Anyone?
I MAY be able to derive something out of the present example given here
:
http://blog.codeinmotion.com/index.php/2006/12/22/pdf-generation-in-ruby-on-rails/
but this deals with filling out forms. Is there a simpler example that
just allows you to talk to itext , send it some plain text and get back
a pdf and then send that pdf to the user as downloadable / renderable
data?
--
Posted via
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?
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/.
2007 Mar 05
0
File I/O 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]
- then I need to convert this into a Java
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
2010 Jun 11
5
Issues creating tables in mysql tests
Hello,
I''m a beginner, so any hints are appreciated; I''m still trying to find my
way around Rails code. For a bug I''ve found I need to create a table called
"values" so I added this:
create_table :values do |t|
t.integer :value
end
among the other table creations in
activerecord/test/cases/migration_test.rb. Is that ok? But then, when I run
the tests
2011 Aug 26
1
gem installation issues
hi all,
This may seem trivial and stupid to the experts , but i have been at it
for over 2 weeks and all answers got from forums did not help with
resolving the issue. Even using cygwin didn''t help , i get the same
errors.
I''m working on a windows- rails combination and am trying trying to
setup an existing application which uses a plethora of gems. I''m done
with about
2008 Jul 14
0
How to Send Itext Generated PDF to Browser?
I am still attempting to figure out how to send an Itext generated pdf
Document to the browser.
I am looking at the following blog posting where someone is using jruby
and iText to create a pdf file and then sending it to the browser :
http://codersifu.blogspot.com/2007/06/howto-generate-pdf-files-in-ruby-on.html
Unlike the above example I am using only ruby / on rails.
I would like to do
2007 Aug 17
1
[LLVMdev] Inserting trace information during opt transformations
Hi all,
In several of the transformations I'm working on I need to embed the
logical equivalent of puts/printf/etc. calls inline with code. I am
having some difficulties getting the transformation code right. As I
understand it, I should be creating a ConstantArray based on the string
(in this case I'm taking an instruction, 'disassembling' it to an
ostringstream then turning
2006 May 14
12
Is there a place for java in Ruby on Rails apps?
Hi all,
I''m asking this question from the standpoint of a developer with almost 10
years experience with Microsoft technologies, mostly doing server side
component and database work. So, I''m not very familiar with the java
world. Can anyon tell me how/if java development can complement Ruby on
Rails development? I''m not interested in how java can duplicate Rails
2007 Jan 17
12
Excel sheet generation
Hi,
Does anyone know of a package that will help with generation of
spreadsheets? (xls files, not csv)
Thanks,
Fredrik
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe
2013 Jun 21
3
[HELP ] Call java code / method from Ruby programming
Hi All ,
I have written java code ( This java code will not return any thing but
it will do action ) which is required call from ruby , please let me what
is best way to achieve this ?
Thanks ,
Muthu Selvan SR
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from
2010 Aug 17
0
Installing selenium-on-rails - error on rake test
I''m following the instructions on installing Selenium on rails: "Run the
Rakefile in the plugin???s directory to run the tests in order to see that
everything works"
When I rake:
DKMac:selenium-on-rails DK$ rake test
I get the following error:
/Users/DK/.rvm/gems/ruby-1.8.7-p174/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:105:in
`const_missing'':