Is there a Ruby gem that can write formulas to an xls/xlsx spreadsheet? The Spreadsheet gem doesn't appear to allow this, at least not in the latest version. Are there any gems out there that allow this or am I stuck doing it in a csv file?
Thanks,
Ben
I had this exact same problem and there is a gem that will do this for you!
Check out writeexcel. It will write all those formulas you have been missing. Here is an example of how it works:
worksheet.write('B5', '=SIN(B4/4)')
Hope this helps!
Related
I've noticed that there are a lot of errors/warnings with the ruby Wordnet gem.
Does anybody know how to get rid of them? Or if the Wordnet gem is being actively maintained? There also seems to be errors using the Wordnet gem with Ruby 1.9.2 (which I've been able to get around following steps in https://gist.github.com/1779371)
Thanks
Maybe have a look at the rwordnet gem instead?
Can someone give me an example to find the difference between two text files in Ruby. I am not able to figure out how to use the diff ruby gem. Also it would be great to know how to apply the diff output on the original file and get the latest file. I tried looking at the documentation for patchr gem but there was nothing available.
I suggest that you try diffy instead.
I have a ruby gem I created and installed and want to be able to use it in a Shoes app. As expected, Shoes reports it cannot find the gem, understandably since the gem is only installed for the standard ruby distribution. Can help pointing towards documentation explaining how to get Shoes to find this gem would be most appreciated.
Thanks.
Unless things have changed since _why left, this is not possible. Shoes is a separate Ruby installation and therefore needs its own gems.
To install a gem, you can do something like this at the beginning of your Shoes app:
Shoes.setup do
gem 'json'
end
Edit: there's also this previous SO thread:
Using Ruby libraries and gems with a Shoes app
U can think Shoes as a ruby-distro, like jruby or other rubies, it maintains its own gems.
therefore you will need to install it via shoes way like Michael Kohl said
I've looked in a lot of places - including www.rubygems.org - but can't find any tutorial that describes an easy, straightforward, technique for producing gems that doesn't rely on other (non-standard-Ruby) components, such as newgem and hoe.
I have several requirements for gem production, from the simplest case of one library file+one test file, to complex ones involving C source files and multiple utility .rb files.
All help gratefully received!
I was researching gem making recently and was also surprised that there wasn't a single, obvious way that everyone does it like how RubyGems is the one-stop shop for managing gems. I discovered that you can actually use Bundler to create gems, and I've chosen this route for my own gems. Take a look at this guide on gem development with Bundler by Radar.
look into Jeweler or one of these options:
http://ruby-toolbox.com/categories/gem_creation.html
its seems like overkill, but you don't need to use all the options, you can use it just to create the skeleton of the gem.
I've recently been looking into the same thing. Here are a few sources I found useful Walk through of a simple gem, Gem spec reference. Also I found it useful to check out large projects on github and model after them Thor's Gem spec.
Don't know if you've seen "Gemcutter Is The New Official Default RubyGem Host", but it's a good starting point. RubyGems.org is a good second stop to read Creating Your Own Gem.
I'm fairly new to programming with ruby and have been trying to install a gem so that I can make graphs. I've tried unsuccessfully with gruff and gnuplot as I have run into errors for both. can someone give me a detailed step by step on how install or a link to one? thanks
there is a discussion about it here
What graphing packages/APIs exist for Ruby?