How to run Redcar HEAD

0 views
Skip to first unread message

Daniel Lucraft

unread,
Oct 13, 2009, 9:37:06 AM10/13/09
to redcar...@googlegroups.com
Hi all,

progress is continuing on the JRuby port (by fits and starts). The
current head does nothing practical except open an empty window, but
there are a lot of new classes behind the scenes. And all tests pass
on both OSX and linux, which is great. (There's also no reason this
shouldn't work on Windows, so if someone wants to try...)

To get set up, clone the repo from github:

$ git clone git://github.com/danlucraft/redcar.git

Download the SWT release that is appropriate for your platform from eclipse.org/swt
and put the swt.jar file into plugins/application_swt/vendor/swt/
{linux,osx64,osx}/

To run Redcar stand in redcar/ and run

$ jruby bin/redcar

To run all tests (specs and features) with rake (must be JRUBY rake),
install rspec and cucumber (as JRUBY gems) and run:

$ rake


best,
Dan

_______________________________
Daniel Lucraft

twitter.com/danlucraft
danlucraft.com/blog


Aaron McLeod

unread,
Oct 13, 2009, 1:41:33 PM10/13/09
to redcar...@googlegroups.com
I'll give it a shot on windows tonight, let you know how it goes.
--
Aaron McLeod
http://agmprojects.com

Luc

unread,
Oct 13, 2009, 1:57:21 PM10/13/09
to Redcar
Hi,

I did try on Vista, and got:

no such file to load -- ... jface/org.eclipse.jface

...stacktrace...

[FreeBASE] failed to load: application_swt

I installed the jar in /swt/windows.

What am I missing?

Thanks.

Daniel Lucraft

unread,
Oct 13, 2009, 3:26:09 PM10/13/09
to redcar...@googlegroups.com
Hi Luc,

Thanks for giving it a shot.

> no such file to load -- ... jface/org.eclipse.jface

Oh sorry, I thought that was fixed on HEAD. Well it is now. Pull and
it should be fixed.

Luc

unread,
Oct 13, 2009, 5:09:28 PM10/13/09
to Redcar
I confirm, fixed.

Aaron McLeod

unread,
Oct 13, 2009, 7:10:16 PM10/13/09
to redcar...@googlegroups.com
It works as well on windows 7 rc. Im trying to fix it however so when i close the window, the program actually terminates. I see in the /plugins/application_swt/lib/application_swt/window.rb file you have a close method that calls the shell to close. I found this post, and thought disposing it might be better, however I am wondering if you have an instance of the display class some where else in the program? http://stackoverflow.com/questions/483173/how-can-i-get-my-basic-swt-application-to-exit-properly-in-mac-os-x-10-5-6

Nick Chistyakov

unread,
Oct 14, 2009, 5:44:55 AM10/14/09
to redcar...@googlegroups.com
Got this error on my Ubuntu 9.04 32bit, jruby 1.3.1

./bin/../lib/../freebase2/lib/freebase/readers.rb:192:in `foreach': No such file or directory - /home/nick/src/redcar/../plugins is not a directory (Errno::ENOENT)
from ./bin/../lib/../freebase2/lib/freebase/readers.rb:192:in `load_files_from_paths'
from ./bin/../lib/../freebase2/lib/freebase/readers.rb:189:in `each'
from ./bin/../lib/../freebase2/lib/freebase/readers.rb:189:in `load_files_from_paths'
from ./bin/../lib/../freebase2/lib/freebase/readers.rb:183:in `load_files'
from ./bin/../lib/../freebase2/lib/freebase/readers.rb:170:in `initialize'
from ./bin/../lib/../freebase2/lib/freebase/configuration.rb:37:in `initialize'
from ./bin/../lib/../freebase2/lib/freebase/core.rb:67:in `initialize'
from ./bin/../lib/../freebase2/lib/freebase/core.rb:35:in `startup'
from ./bin/../lib/redcar.rb:20:in `start'
from bin/redcar:7

I had to make a link to that directory.

After that I got the main window running :))
I have to Ctrl-C to terminate the program though.

Best regards,
Nick

Daniel Lucraft

unread,
Oct 14, 2009, 6:11:47 AM10/14/09
to redcar...@googlegroups.com
Please delete your ~/.redcar directory and try again.

D
_______________________________
Daniel Lucraft

twitter.com/danlucraft
danlucraft.com/blog




Aaron McLeod

unread,
Oct 14, 2009, 6:30:13 AM10/14/09
to redcar...@googlegroups.com
Yeah the ctrl+c thing to terminate is what i was trying to figure out yesterday, just wasnt sure if there was something containing the shell object that needs to call dispose, as well as the shell.

Daniel Lucraft

unread,
Oct 14, 2009, 6:34:07 AM10/14/09
to redcar...@googlegroups.com
On OSX applications get a Quit menu option automatically, so that
works without trying. But on Linux closing a window does not
necessarily mean the application quits. I think we have to catch the
window being closed and send stop to the SWT EventLoop when that
happens.

D
_______________________________
Daniel Lucraft

twitter.com/danlucraft
danlucraft.com/blog




Aaron McLeod

unread,
Oct 14, 2009, 6:38:57 AM10/14/09
to redcar...@googlegroups.com
Yeah, I've used swing a decent amount, and I usually call something like this for that.

This will work in jirb for instance:
frame.show
frame.setDefaultCloseOperation(javax.swing.JFrame::EXIT_ON_CLOSE)

mess around with the frame now if you want, resize and what not. When you close it, the variables will terminate properly in the jirb. Im not sure of the swt equivilant, but the objects seem to have both close and dispose methods. It's just closing which ones at the right time, or end of application properly.

Nick Chistyakov

unread,
Oct 14, 2009, 7:52:16 AM10/14/09
to redcar...@googlegroups.com
Deleting ~/.redcar directory solved the problem.
Thanks :)

Best regards,
Nick

Samsinite

unread,
Oct 25, 2009, 11:25:11 PM10/25/09
to Redcar
It is working great for me! Just one question, how do I change the
theme to the railscast theme that is used for the screenshots posted
on the website?
-Sam

Daniel Lucraft

unread,
Oct 26, 2009, 4:58:11 AM10/26/09
to redcar...@googlegroups.com
Look in plugins/edit_view_swt/lib/edit_view_swt.rb, it is currently
set to "Twilight" but you can change it to Railscasts

best,
Dan

_______________________________
Daniel Lucraft

twitter.com/danlucraft
danlucraft.com/blog




Reply all
Reply to author
Forward
0 new messages