2nd Release of Visual Ruby

Hi y’all:

I’ve just added support for active_record to visualruby, so you can add
active_record objects to listviews and treeviews. I’ve also updated the
documentation today.

So, its time for the second release!

go to:

http://visualruby.net (click on download)

If any of you have time, please try to install it, and let me know how
it goes. I’m getting a fair number of downloads, but I suspect that
people are encountering install issues. I’d really like to know what’s
going on.

Thanks for all of your great work.

Yours,
Eric

I had tried it and it was failing because it couldn’t find devkit
(cairo) even though I had it installed and checked the windows path.

This version though installed ok and I have it running and ran the
simple example script fine. As soon as I get more time I will give it a
proper whirl.

Can I ask about licensing? If it is something you want to get paid for
(which is absolutely fine) then I would prefer to know before I put too
much time into it. If it is open source then I would learn it rather
than start on GTK itself.

Also, I know you disagree, but I still think version numbers would be a
good idea, even at this stage. It helps us keep track :slight_smile:

Oh one error I am getting, which doesn’t seem to affect much:
Gtk-WARNING: **:Unknown property: GtkMenu.ubuntu-local

Thanks Kevin. I appreciate your help.

The cairo error kou fixed. It was a problem with the gtk2 gem. The
“unknown property” is a bug in GTK and they fixed it as well. However,
the bug report that I read said that it was fixed in mid-2011, and it
doesn’t seem to be reflected in the versions that are available for
download.

The gtk files from the glade page are dated 2009. I don’t know how to
install the latest files. Anyone?

In the meantime, you can just ignore the warning. It doesn’t seem to
affect anything.

Yours,
Eric

Recent Ruby convert and now trying visualruby for a GUI for an
application I wrote. Have just followed instructions here:
http://visualruby.net/site/Download.html
for Windows install.

Following the 10 minute video I created a new project.

Getting the following error when I right-click to “Edit Glade File”
“The following command couldn’t run:
C:\Program Files (x86)\Gtk+\bin\glade-3
C:/VisualRuby/anothertest/bin/glade/MyClass.glade
Check the path in Tools > Settings”

I also cannot run Glade from the Settings menu using any of the supplied
command lines.

I can run Glade using Windows Run command with the same command line VR
tried, ie:
“C:\Program Files (x86)\Gtk+\bin\glade-3
C:/VisualRuby/anothertest/bin/glade/MyClass.glade”

Stuck at pretty basic level here but, I would appreciate it if anyone
can tell me what I am doing wrong here.

Two other facts re the failure to open Glade issue:
If I open one of the example projects supplied, then right-click “Edit
Glade File” does open Glade as expected.

If I create my own project in the same folder
(C:\Users\James_Flanagan\visualruby_examples) those projects have the
same problem noted above, ie right-click “Edit Glade File” does not open
Glade.

thanks in advance for your ideas - Jim

Eric C. wrote in post #1054542:

Hello,

I’m getting a fair number of downloads, but I suspect that
people are encountering install issues. I’d really like to know what’s
going on.

It’s seem that when we conserve lot of versions in rubygems.org, the
statistics became wrong : there are some web scraper which download
every reference each time the page change…

I use ‘gem yank -v x.y.y project-name’ for conserve only
last version in the project home page list.

I have same strange feeling with my little Ruiby tools : lot of
downloads,
no so much echos…

Regards,
Regis

Hi Jim:

Thanks for the feedback. I believe that there is a problem with your
path. When the ruby command line is installed I think it has a
different path than the normal command prompt. So whatever command
works at the ruby command prompt, should work with visualruby too.

Look under start > Programs > Ruby Command prompt

try getting glade to run at that prompt. You can also try to print the
PATH environment variable to see what paths are included. I believe
these will be different from your normal command prompt.

Also, I believe that if you give the full path to the executable, it
should work too. Please try these suggestions, and report back.

I vaguely remember encountering this problem myself.

I’m using linux now, but I will try on my computer in Windows too.

Let me know what happens, or if you’re still unclear on the problem.

Thanks,
Eric

Also, I think it actually is working on your computer because it works
with the examples. Just make sure that your project, “anothertest” has
the exact same glade command (in settings) as the examples, and it
should work.

Visualruby has different settings for each project, so check the
settings on each one.

I think this must be the problem.

Eric

Jim, you might be interested in this PATH editor, it makes it easy to
check/change the path to ruby.exe in windows:

http://www.redfernplace.com/software-projects/patheditor/

Jim Flanagan wrote in post #1058200:

Recent Ruby convert and now trying visualruby for a GUI for an
application I wrote. Have just followed instructions here:
http://visualruby.net/site/Download.html
for Windows install.

Following the 10 minute video I created a new project.

Getting the following error when I right-click to “Edit Glade File”
“The following command couldn’t run:
C:\Program Files (x86)\Gtk+\bin\glade-3
C:/VisualRuby/anothertest/bin/glade/MyClass.glade
Check the path in Tools > Settings”

I also cannot run Glade from the Settings menu using any of the supplied
command lines.

I can run Glade using Windows Run command with the same command line VR
tried, ie:
“C:\Program Files (x86)\Gtk+\bin\glade-3
C:/VisualRuby/anothertest/bin/glade/MyClass.glade”

Stuck at pretty basic level here but, I would appreciate it if anyone
can tell me what I am doing wrong here.

Jim - I found that if I upgraded to win32 Glade 3.8.1 then any opening
windows/editing Glade file problems went away. This was more than a
path problem because the Glade icon would show in the tool bar.

I do see that creating a new project doesn’t give the skeleton anymore.
There is no main.rb. I don’t know if that’s a 0.0.59 difference from
0.0.55 or a result of my Glade upgrade.

Mike

Hi Mike:

Are you sure the skeleton project isn’t being created correctly? I just
tried it on my machine and it worked fine.

To test, select the “open project” tool. Select the “Select Folder”
button. Select “Create Folder” and type in a folder name and press
enter. The box should be empty and pink for a new folder. Then hit the
“Open” button. Visualruby should be open with a blank project. Hit the
run button and a “Hello World” window whould appear. Is this what you
get?

There is no main.rb file anymore. It’s replaced with a file that is
called simple “main” (no .rb extension). I did this because when you
make an executable program its nice to omit the .rb so it can be run
more easily on the command line.

Please give me feedback. Do you understand how to use it?

Thanks,
Eric

Wow cool, will soon try it out. I think it has got a great potential.
Going thru screen cast.

Hi Eric
(my first post on this forum)
VR looks v.interesting. I only know little bits of ruby and gtk, but
thought I would try to follow your download instructions exactly on a
win7 32-bit machine from the point-of-view of an absolute novice, and
report on any problems. Here we go:

I’m reading your downloads page…
As suggested, removed existing ruby-gnome. Installed specified version
of ruby (leaving a previous one there). I checked the 3 boxes for Tcl,
Add to PATH, Associate with .rb. Not sure if needed to do this.

Installed your glade download.

Now to install vr. You say:
Install viusualruby by going to
Start > Command Prompt With Ruby and entering the command:
gem install visualruby

(There is a typo: viusual)
What is ‘Command Prompt with Ruby’? It is not on my Start menu.
I just chose Command Prompt (it was currently in one of my other
folders, but the install worked OK. Good!
(The final line of the gem output was: file ‘lib’ not found)

I then typed vr at the command prompt - it seems that this command
worked from any directory.
I got the warning:
C:/Ruby193/lib/ruby/gems/1.9.1/gems/vrlib-0.0.32/lib/GladeGUI.rb: line
127
Gtk-WARNING **:Unknown property: GtkMenu.ubuntu-local

Runs fine - looks great - tried some of your examples.

Tried the help menu - it needs an ‘about’ - I know you know this!
Tried Help…Tutorials. Gives the error:

The following command couldn’t run:
firefox http://www.visualruby.net
Check the path in Tools > Settings

So I did indeed check the path, and the default setting is firefox - I
set this again. (I use firefox v12.0) Same problem. I explored this.

Typing firefox or firefox.exe results in a message saying that it is not
recognised as a program or command - unless I run the command prompt in
the folder that firefox is installed in.
So, you maybe need the full path to firefox, or maybe you could just
exec the web address and let windows run its default browser. Not sure
which is best or portable.

Good luck, great stuff!
Mike

Sorry for the late response.

Mike, I’m running Windows 7 and when it installs ruby, it does install a
program on the start munu called “Command Prompt with Ruby.” I don’t
know why your machine is different. But it works!

Don’t worry about the “Ubuntu local” warning. Its a bug that doesn’t
hurt anything.

The browser command is simply the command you run from the command
prompt to start your browser. I don’t think the exec command can be
substituted because it will stop the current process.

The “lib” not found error means you need to install rdoc (I think). I’m
not sure. If anyone knows about this please post the answer.

Thanks,
Eric

I’m trying to install vr on Ubuntu 11.04, and after running: {{ sudo gem
install visualruby }} I get the following error:

ERROR: While executing gem … (Errno::ENOENT)
No such file or directory -
/var/lib/gems/1.9.1/gems/visualruby-0.1.0/["."]/vr

Any suggestions would be appreciated.

Sorry for the late response.

If you’re running rvm, sometimes you need to omit the “sudo” part of the
command:

gem install visualruby

Also check to see if your ruby versions match. The path in your error
is using ruby version 1.9.1. Is this the version you intended? Your
gem install command should install visualruby into the path that
corresponds to the version of ruby you’re using. For example, when you
use ruby 1.9.3 it should install into a path that corresponds to version
1.9.3 etc.

Check each step.

Let me know how it goes.

Eric

Also check to see if your ruby versions match. The path in your error
is using ruby version 1.9.1. Is this the version you intended? Your
gem install command should install visualruby into the path that
corresponds to the version of ruby you’re using. For example, when you
use ruby 1.9.3 it should install into a path that corresponds to version
1.9.3 etc.

Note, that 1.9.1 directory under your ruby home path will say Ruby 1.9.1
regardless if its 1.9.1, 1.9.2, or 1.9.3.

It doesn’t mean that your ruby interpreter is 1.9.1, why this is can be
answered by some one I am sure.

I have a number of ruby builds on my system. 1.9.1, 1.9.2, and 1.9.3 all
installed to there own location. The 1.9.1 directory tree appears under
all them. It does NOT create a 1.9.2 or 1.9.3 directory.

Eric C. wrote in post #1068223:

Also check to see if your ruby versions match. The path in your error
is using ruby version 1.9.1. Is this the version you intended? Your
gem install command should install visualruby into the path that
corresponds to the version of ruby you’re using. For example, when you
use ruby 1.9.3 it should install into a path that corresponds to version
1.9.3 etc.

Check each step.

Let me know how it goes.

Eric

I did not have vrm installed, and I was switching between 1.8 and 1.9.1
with a home grown script. I have since installed the missing vrm and
also Ruby 1.9.3. I now managed to install {{ visualruby }}.

Thank you for your reply :slight_smile:

Eric C. wrote in post #1054542:

Hi y’all:

I’ve just added support for active_record to visualruby, so you can add
active_record objects to listviews and treeviews. I’ve also updated the
documentation today.

So, its time for the second release!

go to:

http://visualruby.net (click on download)

Yours,
Eric

This software rocks!