And all I did was follow the instructions in the readme.. Now to play with the software!
www.redcareditor.com
This tutorial may be incomplete – I set this up from my system, which already has a lot of libraries and packages installed. The readme recommends glib, gtk, gtksourceview2 and such – YMMV.. This is what -I- had to do.
# eselect ruby set ruby18
# layman -S
# layman -a gnome
(if you are running on amd64)
# echo “dev-libs/libgee ~amd64″ >> /etc/portage/package.keywords/common
# echo “dev-lang/vala ~amd64″ >> /etc/portage/package.keywords/common
# emerge dev-libs/oniguruma dev-libs/libgee ruby-gnome2
AND HERE’S WHERE IT BIT IT. I couldn’t build ruby-gdkpixbuf2 against Ruby19 and I didn’t feel like uninstall Ruby19.
# gem install oniguruma activesupport rspec cucumber hoe open4 zerenity
I guess I’ll have to wait a little longer for this machine. I do have an old laptop running Ubuntu – and redcar gives detailed Ubuntu installation instructions.
$ sudo apt-get install libmysqlclient15-dev
$ sudo gem install mysql
Easy! But .. gotta know it.
Taken straight from this blog
in a terminal.. First do a ‘locate mysql_config’ and then replace the path in the following command with where that file is.
$ sudo gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions. This could take a while…
Successfully installed mysql-2.7
1 gem installed
UPDATE!
Cowlibob did a fix, find it at : http://github.com/cowlibob/rubyscript2exe
Untested!
From ‘The Higgs bozo’ on the ruby newsgroup. Apply change to both rubyscript2exe and tar2rubyscript. As far as I know that makes it work with newer versions of Ruby but I didn’t get to play with it yet.
— rubyscript2exe.rb.orig 2009-04-03 10:28:41.140806000 -0400
+++ rubyscript2exe.rb 2009-04-03 10:29:40.108423800 -0400
@@ -618,7 +618,7 @@
newlocation do
if __FILE__ == $0
- $0.replace(File.expand_path(“./init.rb”))
+ $0 = File.expand_path(“./init.rb”)
TAR2RUBYSCRIPT = true unless defined?(TAR2RUBYSCRIPT)
This is good for 1.8.6
In your ruby\bin directory, there should be an ‘irb.bat’ and an ‘irb’ file. Edit that ‘irb’ file.
all you have to do is add :
require “irb/completion”
under ‘require “irb” ‘ and you’re set.
If you have 1.8.7, it looks like that’s in the irb.bat file instead..
And if you have 1.9, it looks like the tab completion is automatically enabled, lucky us! (unless I made a change and forgot about it).
As is, this code will create an array of arrays – Directories with the same 6 first characters will be grouped in the same sub-array. I am using this for log directories, name format 20081125 for instance – you can just replace the logic to be whatever you need, of course.
dirs = []
Dir['*'].each do |item|
if File.directory?(item)
if dirs.empty?
dirs << [item]
next
end
inserted = false
dirs.each_with_index do |list_of_folders, index|
if list_of_folders[0].to_s[0..5] == item[0..5]
dirs[index] << item
inserted = true
end
end
dirs << [item] if !inserted
end
end
Erik Veenstra created two scripts, tar2rubyscript and rubyscript2exe, which essentially grab what you wrote, wrap it up with some other code, bundle it with the ruby executable, and spit out a finished, executable package – which will run on that same OS — so compile it on Windows, get a Windows executable, compile on Linux, get Linux executable, etc.
tar2rubyscript
rubyscript2exe
As I’m a newb, it took me a while to figure out that I need .. ‘stuff’ in the init.rb file. Since I’m writing scripts, I just stuffed the whole simple script in init.rb.. This also means I don’t really understand how to do bigger programs, but I think that with more knowledge than mine, these pages are worth their weight in pixels. Made of gold.
require 'win32ole'
ie = WIN32OLE.new('InternetExplorer.Application')
ie.Visible = 1
ie.navigate "www.google.com"
That’s the basics for it. I found another basic intro from Ruby on Windows blog .. And don’t forget you can instantiate an object and then do something like..
properties = ie.ole_get_methods
to get more information. This comes in very handy
Cedara iReadmammo (now Merge Mammo) is a DICOM viewer geared towards mammography reading. By default, the data source you use for reading is the local machine, but you can add others — and you can set up various DICOM nodes so it can transfer images between various studies. One big issue is that it is not promiscuous for transfers, so if the other machine doesn’t know about you, you can’t transfer. Actually, since the Query/Retrieve tool allows both a source and destination different than the local machine, you can use iReadmammo for transfer between two other machines.. As long as all three of them know each other.
This script attempts to make life a little easier when first setting up the machine, by parsing two YAML config files (one for DB source, one for DICOM nodes) and adding them automatically. As an added bonus, there is the option of adding the new machine to remote hosts and scheduling a task to run at midnight to stop and restart the scriptservice (so the software reads the config again).
It requires the files ‘ireadmammo_hosts.yml’ (for Datasources) and ‘DCconfig.yml’ (for DICOM nodes), and if they don’t exist in the same directory as the script, it’ll offer to create them for you and allow you to configure them.
Error-checking is a little spotty, as I really wanted to finish the script at this point. It’s the biggest thing I’ve written in several years.
Recent Comments