Does anyone want to try visualruby?

Hi y’all:

I have a working version of visualruby available, and I’m hoping that
some of you guys will try it. To install it, just enter:

$sudo gem install vri

Then run:

$vri

That will install an installer gem. If you answer “yes” to install
everything, it should install. Please tell me if it doesn’t.

Details at: visualruby.net

Post any questions to this forum, and I’ll get back to you.

Thanks to kou, Simon, Andrea, Ian, and everyone else who’s helped me!

Eric

Hi Eric,
after “gem install vri” (everything seems to install fine) if I try
to run visualruby with “vri” i get:

C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require’:
cannot load such file – pty (LoadError)

This is on windows 7 32 bit, ruby 1.9.3

Andrea

P.S.: congrats on your first release!

Da: “Eric C.” [email protected]
A: [email protected]
Cc:
Data: Tue, 06 Mar 2012 05:37:04 +0100
Oggetto: [ruby-gnome2-devel-en] Does anyone want to try visualruby?

Hi Andrea:

Great to hear from you. Thanks for all your help with learning ruby.
All of your advise was exactly right. Now I understand.

To run vr, type:

$vr

vri is just the program to install it. I’m not sure if it will work
with Windows 7 because it uses Gtk::Builder. But you’re the expert.
Will it work?

I installed freightrain again on my new ubuntu, and it worked perfectly,
I’m still trying to work with it. When I learn rails, I’m sure I’ll
understand a little more.

Yours,
Eric

Hi Eric,
I don’t have a “vr” available at prompt - probably because I didn’t
install it with vri.
The issue is most likely not related to Gtk::Builder (since it works
fine in freightrain).

Looks like this
(ruby - Problem with starting foreman for Clojure app - Stack Overflow)
is the issue.

Best!

Da: “Eric C.” [email protected]
A: [email protected]
Cc:
Data: Tue, 06 Mar 2012 19:12:19 +0100
Oggetto: Re: [ruby-gnome2-devel-en] Does anyone want to try visualruby?

Hi Simon and Andrea:

Thanks for your responses, you’ve both helped me tremendously (as
usual).

Andrea, don’t worry about vri because pty is not in windows. Simon is
right, vri is for debian/ubuntu now.

I pushed a version 28 last night that works on Windows 7 and XP.

Let me work on all these issues, and I’ll repond when I’ve looked at
them.

Thanks,
Eric

Hi, can you add this command please?

vri --help

And also add a new option.

I would like to have an option to skip installing the dependencies and
ALL the questions it asks.

Right now it wants to install things like ruby1.8-dev.

I compiled ruby from source, I don’t use anything debian offers, so for
me as a User I need a way to entirely bypass all of that (as an option).

############################################################################

Visual Ruby Requirements:

############################################################################
ruby ruby_version()
1.8.7
rubygems rubygems_version()
1.8.15
ruby1.8-dev dkpg(‘ruby1.8-dev’)
Needed
libglib2.0-dev dkpg(‘libglib2.0-dev’)
Needed
libatk1.0-dev dkpg(‘libatk1.0-dev’)
Needed
libpango1.0-dev dkpg(‘libpango1.0-dev’)
Needed
libgtk2.0-dev dkpg(‘libgtk2.0-dev’)
Needed
libgtksourceview2.0-dev dkpg(‘libgtksourceview2.0-dev’)
Needed
libopenssl-ruby req(‘net/https’)
INSTALLED
gtk2-engines-pixbuf dkpg(‘gtk2-engines-pixbuf’)
Needed
gem:visualruby visualruby_version()
Needed

Also, the checks are somewhat wrong for my system. I have all of atk,
pango, gtk installed and working here (rubygnome works).

I believe your code must assume that there must be a .deb package
installed. But I compile and use all of ruby on my own from source
compilations.

Hi Marc:

Simon was right, that vri isn’t the best way to install. I’d suggest
installing glade, then just installing these two packages:

sudo apt-get install libgtksourceview2.0-dev gtk2-engines-pixbuf

Then just use

sudo gem install visualruby

To run it type:

vr

I’m writing new install instructions right now. Please get back to me
to tell me how it works, and your other suggestions. I’m going to dump
vri.

Also, I’ve now run visualruby on Ubuntu, Win7, and Win XT. And I’ve
run it with Ruby 1.8.7 and 1.9.3.

Thanks for tolerating me in development stage. I will post here when I
have news.

Yours,
Eric

Hi Simon:

Thanks for taking the time to test my program, and your great advise.

I’m taking your advise and dumping vri. I posted new install
instructions on visualruby.net.

I then tried to install visualruby, it failed on one dependency that I
quicly installed, and all went ok.

Do you happen to remember what this dependency was? It would be helpful
if I could include it.

About all the errors for “undefined method” etc. That turned out to be
a bug/enhancement of Ruby 1.9. They changed the
Object#instance_variables method on me, so it returns symbols instead of
strings now.

I fixed it with a “.to_s” conversion, and it all works with 1.9
now.

I listened to your advise about the command “glade” not working. I
added a setting for “Glade command line” so you can set it to your
glade.exe. Thanks.

tutorials points to an invalid URL

HaHaHa. I’m imagining a guy thinking, “I need help…” Wait, that’s
happened to me!!! lol. I fixed that, and removed “About” for now.

I actually don’t think it has too many bugs now. I’ve been using it a
lot. I just programmed it using ruby 1.8.7 thinking everything would be
compatable with ruby 1.9 (and it almost was).

When you have time would you be willing to install it again? I would
like to know if the listview example works. And if you can remember that
dependency.

Thanks,
Eric

On Tue, 06 Mar 2012 05:37:04 +0100,
“Eric C.” [email protected] wrote :

everything, it should install. Please tell me if it doesn’t.
I tried vri. First of all, I think this is a BAD idea.

Anyway, it failed on ruby version. You should just use RUBY_VERSION,
and not regexping the command ‘ruby -v’. Same for rubygems, there is
Gem::VERSION.
After that, it listed the dependencies, however, although most were
installed, all showed as ‘needed’. That’s on Fedora 16.

I looked at vri, and saw a very debian/ubuntu centric script. I stopped
there as I think it’s a awful solution to a false problem.

You should just list the dependencies needed on the official site.

I then tried to install visualruby, it failed on one dependency that I
quicly installed, and all went ok.

On fisrt launch, it failed with :
/home/maz/.rvm/gems/ruby-1.9.3-p125/gems/vrlib-0.0.16/lib/GladeGUI.rb:143:in
block in parse_signals': undefined method split’
for :proj_path:Symbol (NoMethodError)

I edited GladeUI.rb to add :
next unless :meth.respond_to?(:split)
before line 143

On second launch, I get this warning :
/home/maz/.rvm/gems/ruby-1.9.3-p125/gems/vrlib-0.0.16/lib/GladeGUI.rb:
line 132 Gtk-WARNING **:Unknown property: GtkMenu.ubuntu-local

It told me about installing samples, showed me the list of the samples
but selecting a project and clicking ‘Open’ does nothing. Selecting a
folder with a sample worked though.

I tried to run ‘calculator’, but I got :
/home/maz/.rvm/gems/ruby-1.9.3-p125/gems/vrlib-0.0.16/lib/GladeGUI.rb:202:in
block in set_glade_variables': undefined method gsub’
for :@builder:Symbol (NoMethodError)

I didn’t looked further for this error.

Clicking on ‘remote gems’ crash vr with :
/home/maz/.rvm/gems/ruby-1.9.3-p125/gems/vrlib-0.0.16/lib/GladeGUI.rb:202:in
block in set_glade_variables': undefined method gsub’
for :@builder:Symbol

That’s almost the same as above.

The listview sample worked, or at least, it didn’t crash right away.
The checkboxes to modify behaviour did nothing.

I also found out that double clicking the glade file launch it with
‘glade’, which is glade 3.10 on my system, and not 3.8.

and finally some minor bugs :
about does nothing
tutorials points to an invalid URL

So, right now, it is heavily bugged, but that is expected. It is still
a great project if you manage to polish it a little, and maintain it
for the years to come. It would be nice if you could clarify the
licence, and setup a repository which we could clone, dvcs prefered.

Congratulations on your first release.

Simon

Le Thu, 08 Mar 2012 23:18:05 +0100,
“Eric C.” [email protected] a écrit :

I’m taking your advise and dumping vri. I posted new install
instructions on visualruby.net.

good

I then tried to install visualruby, it failed on one dependency
that I quicly installed, and all went ok.

Do you happen to remember what this dependency was? It would be
helpful if I could include it.

It was in vri list. it is gtksourceview2.

I listened to your advise about the command “glade” not working. I
added a setting for “Glade command line” so you can set it to your
glade.exe. Thanks.

Looking at the preferences, the default backup path is /home/eric,
which is not ideal.

When you have time would you be willing to install it again? I would
like to know if the listview example works. And if you can remember
that dependency.

The listview works OK now.

However, all tutorials crash, including listview, on a fresh install.
If I click run, i get :
/home/maz/.rvm/gems/ruby-1.9.3-p125/gems/visualruby-0.0.33/bin/main/VR_Main.rb:217:in
save_state': undefined method full_path_file’ for nil:NilClass
from
/home/maz/.rvm/gems/ruby-1.9.3-p125/gems/visualruby-0.0.33/bin/main/VR_Main.rb:202:in
`run_command’

The previous listview I had, maybe because it managed to run once, did
not have this problem.

If I click save, I get :
/home/maz/.rvm/gems/ruby-1.9.3-p125/gems/visualruby-0.0.33/bin/main/VR_Main.rb:139:in
toolSave_clicked': undefined method try_to_save’ for nil:NilClass
from
/home/maz/.rvm/gems/ruby-1.9.3-p125/gems/gtk2-1.1.2/lib/gtk2/base.rb:95:in
`call’

Creating a new project, I have a few remarks :

  1. I really dislike “File.expand_path(File.dirname(FILE)”. It is
    the job of rubygems to include your gem in the load_path. And in case
    you are calling ruby directly, it is easier to add “-I.” to the
    command-line, imo.

  2. I also dislike ‘require_all’. But it might be easier for newcomers.

About the GUI in general :

  1. Remote gems ask for user and password, however, I don’t have an
    account.
  2. Removing a local gem with an executable asks to delete it in the
    console behind. I think you are using th gem command, you might want to
    look at the gem API and do it directly in ruby.
  3. Settings seems to be on a per project basis, and not global.
  4. the browser URL choices lacks ‘xdg-open’
  5. the radio (On disk|Open docs) does nothing.
  6. I think english use ‘Skeleton’ and not ‘Skeliton’
  7. Create desktop launcher did nothing for me
  8. You cannot create a new folder directly on the left panel
  9. If I unselect everything in the left panel, right-click crash the app
  10. The title of ‘Files’ seems to have capital ‘i’

And there are tons of improvements I think of, but I will keep them for
later. Some of them are just ideas I have to think about before
submitting them.

As a last word, please provide a licence for the project.

regards

Simon

I created an account just so I could post and say: Well done!!!

Please keep up the good work Eric, I will certainly be giving it a try
in a month or so when I have time.

Could I suggest a news section and version numbers so we can keep track
of where you are with it a bit easier?

Thanks Kevin. I really appreciate it. I’m still in rapid development
stage, and I just added support for ActiveRecord objects yesterday. So,
the news goes so fast that its hard to keep up with.

Please let me know how your install goes. I’d really like to get more
bug reports.

Thanks,
Eric

Hi Simon:

Thanks for finding all those problems.

The first bug was in my brain when I was sleepy last night and forgot to
include a line of code that insures that a document is always open
(Untitled). That was the cause of the crashes. I repeated the error,
and fixed it. Thanks!

  1. I really dislike “File.expand_path(File.dirname(FILE)”. It is
    the job of rubygems to include your gem in the load_path. And in case
    you are calling ruby directly, it is easier to add “-I.” to the
    command-line, imo.

I will research this and consider it. I know that line is big and ugly,
but it is foolproof.

  1. I also dislike ‘require_all’. But it might be easier for newcomers.

Hey! I’m a newcomer :slight_smile: This is something that has helped me a lot. I
can move files all around with no problem, and I’m requireing them all
anyway. Also, I really want to appeal to newcomers. RIght now everyone
is a newcomer :slight_smile:

  1. Remote gems ask for user and password, however, I don’t have an
    account.

There’s nothing I can do about that.

  1. Removing a local gem with an executable asks to delete it in the
    console behind. I think you are using th gem command, you might want to
    look at the gem API and do it directly in ruby.

Yes that’s a good idea. I’m now using the API. However, if the API
fails due to lack of file permissions, it falls back on the sudo
command. I’ll need to add the switch to automatically delete the
executable. That will be in the next release. Good catch.

To force it to use the API, you can run: sudo vr

(totally undocumented at this point)

  1. Settings seems to be on a per project basis, and not global.

Right now, I think its ok. If the list of settings gets longer, I’ll
think about making a system wide settings file.

  1. the browser URL choices lacks ‘xdg-open’

Not anymore they don’t :slight_smile:

  1. the radio (On disk|Open docs) does nothing.

No, it defines where the search takes place. If you scan for text, it
will search the “on disk” versions, or the open docs in memeory.

  1. I think english use ‘Skeleton’ and not ‘Skeliton’

My spelling sucks. Fixed

  1. Create desktop launcher did nothing for me

I think its for Ubuntu. I’m struggling to find an easy way to open a
project without having to select it each time. Desktop launchers are
nice, but will only work on certain platforms. I’m open to suggestions.

  1. You cannot create a new folder directly on the left panel

That’s true, but I don’t think its very important. VR will create
folders it needs, and you can create folders when you save-as.

  1. If I unselect everything in the left panel, right-click crash the app

You computer is behaving differently than mine. My computer
automatically selects the row when I right-click. I tried to force it
to select, but I can’t check on my machine because all the mouse buttons
select the row. As a fix, I made it do nothing unless a row is
selected. I’d rather be able to make your computer select the row, but
this should be acceptable. So to right-click, select the row, then
right-click. Let me know if its good.

  1. The title of ‘Files’ seems to have capital ‘i’

Wow! you don’t miss anything! Fixed :slight_smile:

And there are tons of improvements I think of, but I will keep them for
later. Some of them are just ideas I have to think about before
submitting them.

I’d love to hear your ideas, you’ve already helped me enormously.
Thanks,

Eric

As a last word, please provide a licence for the project.

I know I need to do that!