Displaying 20 results from an estimated 300 matches similar to: "iText, Rails, and OS X"
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
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
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 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 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
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 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
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?
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
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
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]
2007 Nov 29
27
Strip & Sanitize BEFORE saving data
So I''ve googled my brains out, and I see a lot of talk about
TextHelper for views, but next to no discussion about cleaning text
_before_ it is saved.
I figured this had to be asked 4 zillion times, but I''m not finding
anything concrete/obvious.
Using h is fine as a safety catch, but that alone is not acceptable
to me as the means of diffusing the impact of HTML or JS
2007 Nov 16
4
Newb - variable returns # sign?
Hi Gurus-
I want to return the variety from the species table based on the
active record link to inventory table
class Species < ActiveRecord::Base
has_many :inventories
end
class Inventory < ActiveRecord::Base
belongs_to :species (this is the singular and the plural, so that''s
OK)
end
My inventory_controller looks like:
def show
@inventory =
2007 Nov 23
2
Capture IP Address to Sessions
What I''d like to do:
Capture the IP addresses of the folks visiting a web site in the
Sessions table.
What needs to be in place (code, model, controller, etc.), where does
it need to go (application controller?), how best to set up the
Sessions table?
Appreciate a noob-friendly outline of what needs to be done.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You
2007 Nov 16
3
Route Information
Is there a method to return a hash of the route configuration based on
a path?
For example:
magic_method(''/my_controller/my_action/my_id'')
=>
{:controller => ''my_controller'', :action => ''my_action'', :id =>
''my_id''}
Thanks!
Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message
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
2009 Jun 11
2
Automatic Calling Feature?
Right now, my organization is using a commercial service (OneCallNow.com),
that gives telephone notifications to all numbers in a predefined list.
Example:
-Admin records a voice message
-Service calls each number in the list, and plays the message back to them
It's a pretty handy service, albeit a bit pricey. I've been wondering if
Asterisk could do this for me? I don't really want
2007 Nov 14
6
a few add_index questions..
on previous apps i hadn''t really worried much about adding foreign key
indexes on my tables just because they''ve been fairly small and i
didn''t really think i needed them.
well, i''m working on something now that has the potential to have a
lot more data, and a lot more foreign keys.
so i have 3 tables... users, projects, and tasks.. should i be using
add_index
2009 Oct 26
17
[Bug 1667] New: sshd slow connect with 'UseDNS yes'
https://bugzilla.mindrot.org/show_bug.cgi?id=1667
Summary: sshd slow connect with 'UseDNS yes'
Product: Portable OpenSSH
Version: 5.2p1
Platform: All
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: sshd
AssignedTo: unassigned-bugs at mindrot.org
ReportedBy: