Which set of libraries and tools would you recommend to use for development SOAP-service on Ruby 1.9 - soap-tools, web-servers, or maybe a web-framework?
Hi there,
A Ruby on Rails app will have access to a number of images and fonts. The images are components of a visual layout which will be stored separately as a set of rules. The rules specify document dimensions along with which images are used and where. The app needs to take these rules, fetch the images, and generate a PDF that is ready for local printing or emailing.
The fonts will also be important. The user needs to customize the layout by inputting text which will be included in the PDF. The PDF must therefore also contain the desired font so that the document renders identically across different machines.
Each PDF may have many pages. Each page may have different dimensions but this is not essential. Either way, the ability to manipulate the dimensions and margins given by the PDF is essential.
The only thing that needs to be regularly changed is the text. If this is takes too much development then the app can store the layouts in 3rd party PDFs and edit the textual content directly. Eventually though, this will prove too restrictive on the apps intended functionality so I would prefer the app to generate the PDF's itself.
I have never worked with PDFs before and, for the most part, I've never had to output anything to the user outside their monitor. A printed medium could require a very different approach to get the best results. If anyone has any advice on how to model the PDF format this it would be really appreciated. The technical aspects of printing such as bleed, resolution and colour have already been factored in to the layouts and images.
I am aware that PDF is a proprietary file format and I want to use free or open source software. I have seen a number of Ruby libraries for generating PDF files but because I am new on this scene I have no way to reliably compare them and too little time to implement and test them all. I also have the option of using C to handle this feature and if this is process intensive then that might be preferred.
What should I be thinking about and how should I be planning to implement this?
I manually placed a library in the library directory (/usr/local/lib/ruby/site_ruby/1.8) and when I try to require it, it says "no such file to load".
I used "$:.first" to get the library path, so why wont it work? Is there any good way to debug this?
Thanks
Hi, I have a question about ruby and wsdl soap.
I couldn't find a way to get each method's params and their type.
For example, if I found out that a soap has a methods called "get_user_information" (using wsdlDriver) is there a way to know if this method requires some params and what type of params does it require (int, string, complex type, ecc..)?
I'd like to be able to build html forms from a remote wsdl for each method...
Sorry for my horrible English :D
I am looking for a system to parallelise my tests in a Ruby on Rails app (using rspec, cucumber) that works using JRuby.
The systems I can find (hydra, parallel-test) look like they use forking, which is problematic in a JRuby environment.
Is it possible to read binary in ruby file and execute it directly in memory?
for example something like this:
x = IO.read('/bin/ls')
execute(x)
I tried system(x) but it doesn't work
ArgumentError: string contains null byte
I have seen this sample written in Ruby code, how i can simulate it in C language?
Open3.popen3(command) do |stdin, stdout, stderr|
@stop_stdin = stdin
while !stdout.eof do
output = stdout.read(1024 * 100)
list_pipes.each do |out|
out.print output
end
end
end
Hi,
I was going over some pages from WikiVS, that I quote from:
because lambdas in Python are restricted to expressions and cannot contain statements
I would like to know what would be a good example (or more) where this restriction would be, preferably compared to the Ruby language.
Thank you for your answers, comments and feedback!
Every time I try to debug my Rails app via Netbeans I get a ...
"Could not connect to web server - cannot show http://localhost:3000"
Rails - 2.3.5
Ruby - 1.8.7-p249
Anyone know how to resolve this?
Thanks
Hi,
I have a sql script file that upon import creates a table in a MySQL database and fills it with 2800 record. These are all the postal codes for the country Belgium.
Now I would like to make a Ruby on Rails database migration file from this. Any idea how I can do this?
Thanks,
Michael
I'm not sure what to call this, so I'll give an example.
In PHP
1==2 || 2 returns 1 or true
In Ruby
1==2 || 2 returns 2 (The second statement if the first evaluates to false).
Is there any short way to implement similar thing in PHP?
I am looking to host multiple ruby on rails apps and want to use lighttpd or nginx.How do I do multiple name server configuration. ?
I know how to do it in apache through webmin control panel.But trying to move away from apache here
In the effort to learn python and/or ruby, I was wondering how a file shredder would be implemented? I would like it to take in a file as an argument and then employ an algorithm to make that file unrecoverable. Would possibly add the support for multiple files or even whole directories later.
What are the best practices for reading and writing binary data in Ruby?
In the code sample below I needed to send a binary file using over HTTP (as POST data):
f = File.new("resp.der", "r") # binary file
begin
while true
out.syswrite(f.sysread(1)) # out is an output stream (type IO)
end
rescue EOFError => err
puts "Sent response."
end
While this code seems to do a good job, it probably isn't very idiomatic. How can I improve it?
Any recommendation on libraries to do audio processing in Ruby. I need to do the following two tasks:
Find silences, for which I'm happy to just be able to iterate over each sample in the wave.
Cut and paste pieces of wav files to form a new wav file.
Convert wav to mp3, which I will probably leave to lame anyway.
I'm looking for the equivalent of NAudio, a C# library.
I want to unescape the following string:
'\u00020\u0002Standard\u00023\u0002Doe John\u000169\u0002\u0010\u0002Lorem\u0002\u0011\u0002Ipsum\u0002\u0014\u0002'
Javascripts unescape function works ok, however how can I unescape it in ruby?
Take in mind that unescape(previousString) is 0Standard3Doe John69LoremIpsum.
Hello,
how would I develop an Email client in Ruby-on-rails taking Gmail as an example? I would be especially interested in the send email functions
Thanks for any pointers
I'm trying to write a ruby script which automatically downloads some files from some server ever 30-45 minutes (to prevent overload) as long as my computer is turned on. It's possible that my computer might be turned off at some point, but the download should resume (probably re-download the current file).
I already have the file list but I can't figure out how to make such a script to run autonomously.
What are some ways I can do this?
Hello,
I've a remote cgi script hosted on Apache using SSL. It takes in two input variables a and b.
I want to call call the cgi script with right input variables using ruby.
Any clues would be appreciated.
In ruby, how do I test that one array not only has the elements of another array, but contain them in that particular order?
correct_combination = [1, 2, 3, 4, 5]
[1, 5, 8, 2, 3, 4, 5].function_name(correct_combination) # => false
[8, 10, 1, 2, 3, 4, 5, 9].function_name(correct_combination) # => true
I tried using include, but that is used to test whether [1,2,3].include?(2) is true or not.
Inspired by this discussion, after some googling I wasn't able to find an answer to a pretty simple question regarding methods in Ruby: are they objects or not?
There are different opinions here and there, and I would really like to hear, let's say, an in-depth explanation.
I'm aware of Object#method method, which takes a method name and returns a Method instance, but, on the other hand, there's a similar thing you can do with blocks to make them into Proc instances, and blocks aren't objects, so what makes methods any different?