Using Ruby on Windows Mobile Devices - ruby

As far as I know, JRuby runs only on full JVM. I found this version of JRuby which runs on Java Micro Edition devices, however it's marked as EXPERIMENTAL AND RESEARCH ONLY
Are there any other options for running Ruby application on Windows Mobile devices?

I'm not sure what you are asking. Your title and your question refer to Ruby, but your description talks about JRuby. Which are you asking about?
I know regular Ruby can run on Windows Mobile (see Rhodes, for example, or RubyOnMobile).

Related

DB2 and jRuby on Rails OS compatibility between Windows 7 and Linux

I have to developed a project that is using DB2 and jRuby on rails. It will be used on Linux platform when it is ready.
I want to know if I developed in using windows 7, I will get any problems when deploying it on Linux?
I want to use the topic ask a few questions about the used technologies too:
What is the official website for "jRuby on rails"?Why there is only a little information about this technology and the few video presentations and the only a book are made 4-5 years ago?
Has anyone knew about any jruby on rails and db2 tutorial or article?
The reason I am asking this questions too is because I want to read something more about these and to be updated about the fixes and new versions as I am really unfamiliar with these two technologies.
Thanks in advance.
I develop Rails applications on Windows and made deployments into Tomcat on Linux servers without any problems.
About your other question, I agree with you, some times it feels like theres not much documentation JRuby oriented but at the end remember that JRuby its only Ruby running over the JVM.
This is the wiki for JRuby https://github.com/jruby/jruby/wiki and here is the official website http://jruby.org/.
Regarding a db2 tutorial I think you should try harder in Google.com there are some gems and more information on the web.

Ruby for cross-platform desktop applications?

Please share you experience building desktop applications with Ruby programming language. What GUI toolkits have you used? How have you packed everything into one installer? What troubles have you spotted?
I saw few articles about using Ruby for desktop, but in teory everything is always great. I would like to know about real-world applications build with ruby.
you can check this out
Non-trivial desktop apps that use Ruby?
i used redcar & its available as a Gem

Is there a library that integrates R into ruby?

I recently investigate a integration between ruby and R on Windows 7. So far, rinruby hangs (on my Windows7 machine) when I run a script. Now I learn from this post that rsruby does not work on Windows at all. Does anybody know a library that would work?
Let me prefix this by saying that I am more of a Linux person than a Windows person ... but at some point the capabilities of the OSs do matter, as does their support for basic POSIX functionality etc.
Hence, it may not be a piece of cake to embed R into Ruby or link it on Windows, as handy as this may be for you. R is after all dependent on the MinGW toolchain on Windows.
As an alternative, consider the excellent Rserve---and I just noticed a seemingly new offspring RserveWin Simon now also provides. This merely needs to run somewhere, and you can then connect over tcp/ip. There are example clients for C/C++ and Java, and other projects such as for example pyRserve and this Rserve-Ruby-client which may fit the bill.
Edit One more Google search also leads to this talk about R / Ruby integration which refers to the RSRruby gem but that (according to another quick search) seems to have issue on Windows too. Maybe Rserve and a connection really is your best ticket.
If you are able to run under JRuby then you may be able to use a Java-based bridge to R.
I currently use RSRuby to integrate R with a Rails application (running on OSX) but I am looking to switch to having a standalone R server shortly.

Ruby Mobile Ports

I'm now learning Ruby because I saw it's a very powerfull language, but now I want to know what mobile ports of Ruby we have and for what devices.
PS: I have a HTC S711, HP iPAQ Hx2, Nokia E61, Nokia N95, Palm T|X, Palm Z22, HP Jornada 720..., it's better if I can use it on these platforms, but I'm open to buy other devices, as I'm a mobile addict.
There's a couple of possibilities:
JRuby can run pretty much anywhere where there is a JVM, which means pretty much anywhere except iPhone. (Apparently, there's even JVM implementations for Windows Mobile.) Note that you need a special stripped-down version for JME-CDC (Java Platform Micro Edition - Connected Device Configuration), which hasn't been updated in a while. However, if you ask nicely, someone will probably at least help you build your own (it basically involves deleting stuff from the main version, recompile, test, delete more, recompile, test, ...).
JRuby can also run on Android. In fact, there's three versions available: JRuby is part of the Android Scripting Environment (ASE), and then there's JRuby lead developer Charles Oliver "Headius" Nutter's Ruboto. The very latest addition is JRuby for Android by Pascal Chatterjee.
MRI was once ported both to Symbian S60 (Nokia) and Windows CE, although I have no idea how hard that is to get working, how current these ports are, whether they are integrated into the official sourcetree or are maintained seperately (if at all) nor if it also applies to YARV. There is a Symbian subdirectory in the YARV sourcecode which was last updated just 5 days ago, and a Windows CE subdirectory in the MRI sourcecode which was updated 6 months ago, though.
Apparently, MRI also runs on the iPhone.
YARV was recently ported to Android.
It looks pretty likely that MacRuby will, in the future, run on the iPhone. The MacRuby developers all either work for Apple or have signed NDAs and are therefore not allowed to say anything, but when one of the lead developers was asked what the new Ahead-of-Time compiler in MacRuby 0.5 would be useful for, he oracled something like "running Ruby on resource-constrained ARM-powered pocket-sized mobile internet devices with security restrictions regarding interpreted code" or something similarly cryptic.
The same applies to IronRuby: since IronRuby runs on Silverlight and Silverlight is Microsoft's new phone platform (or everything-platform, really), I wouldn't be surprised to see IronRuby on at least the new Windows Phone 7. [EDIT: Actually, it already does, IronRuby on Windows Mobile 7 was demonstrated at MIX10.]
In the meantime, the Rhodes mobile framework by Rhomobile allows you to develop cross-platform (iPhone, Windows Mobile, RIM (Blackberry), Symbian (Nokia) and Android) native mobile applications using HTML as the UI. The way it basically works, is that you write your UI in HTML which gets displayed by the native browser control that is built into the phone, and the Rhodes framework then supplies the necessary CSS and JavaScript to make it look and feel "native". However, it's not a web application: the webserver that serves the HTML also runs on the phone, as does the Ruby interpreter in which you run your models and controllers. (See this answer I gave to another question for more details.) Even if you don't want to use their framework, you can still steal their different Ruby interpreters for the different platforms. E.g., they actually use XRuby, not JRuby for their Blackberry port and YARV via the Android Native Development Kit for their Android port.
I have tried Ruby on Symbian about a year back, it was easy to get going but was a bit limited in how it integrated into the phone. I see the project have progressed a lot since then. I will definitely try it out again.
Coming soon: MobiRuby is an upcoming (Summer 2012) project using the mruby interpreter. It's iOS specific, but I wouldn't be surprised to see mruby use elsewhere in the coming months.

Can Ruby be used to develop simple Windows applications?

I've been developing Windows based applications for a long time and most of my present clients still desire a desktop or client/server Windows application. Is it possible to use Ruby for such applications as opposed to its primary purpose of being a Web-programming language?
Ruby is not primarily a web programming language even though Ruby on Rails is certainly suited for web development. Ruby is a general purpose scripting language.
The FXRuby and WxRuby frameworks are the most fully featured GUI frameworks for Ruby. You can write the apps in Ruby and then generate a Windows executable. The frameworks are cross-platform, so you could also run the apps written in these on other platforms, like Linux or Mac OS X.
There are also a few other less popular approaches like QtRuby and Shoes, and you can even use IronRuby (a CLR Ruby implementation) to write a .Net application.
Ruby is a general purpose object oriented scripting language. Ruby on Rails is a web application framework. Ruby predates Rails by about ten years. Don't confuse the two.
Yes, you can. Ruby is a full scripting language. You might want to start with the Ruby language homepage to see the capabilities and libraries that are available.
However, just because you can doesn't mean that you should. Before jumping in and using Ruby for a project, see if Ruby can give you things that other languages can't or if there are any disadvantages to using Ruby.
I know this thread is old, but for future reference to anyone who's looking into options for using Ruby for a GUI app, don't use QtRuby. I had developed a project for school in about a week, fully functional and pretty, only to find out that I could not release it. There was simply no way to package and distribute the application without having your users simulate your exact environment (install all the gem dependencies, build Qt development libraries etc). I tried using:
Crate: supposedly cross-platform, but I found only 1 usage example that's written in 2008 out of ~2 hours of googling, and the example basically covers a very specific subset of applications (some ssl/https authentication gem or w/e...)
Ocra: this looks like a candidate, but it's windows-only and didn't meet my requirements, as I had to target the three primary platforms
tar2rubyscript + rubyscript2exe: I had spent most of my time trying to get this to work because I've come across many who claimed that this is the way to go for distributing GUI apps built in ruby (albeit using other toolkits, Tk/GTK/wxRuby) but it didn't work either; I was endlessly faced with a cryptic error that basically breaks Qt::UiLoader functionality, in other words, you can't load .ui sheets you create with QtDesigner so...
Yes I'm angry and frustrated honestly, because I don't see the point of creating software that you just can't release for anyone to use. Now I'm left with a deadline coming up in a week, and I just hope I make it in time porting the app to C++.
So my answer is, don't use QtRuby. At least for now.
On a mac, you can use the Ruby Cocoa lib to create (what appear to be) native applications. If you want something more cross platform then you might consider a wrapper like shoes or qt.
The Qt toolkit seems the most popular way to do it. The website is http://www.darshancomputing.com/qt4-qtruby-tutorial/
I'm currently writing a little app in a wrapper called Shoes. This seems to make it as simple as pie to create windowed apps in ruby. http://shoes.heroku.com/ is the website.
At the moment Shoes looks suitable only for small personal apps. I say this because it's author recently went AWOL and it's not clear whether it will be developed further. I'm using it to write a game log parser to generate statistics from a flight sim. It's ticking along nicely.
Ruby can be used for developing GUI applications, whether Windows specific or cross-platform.
For Windows targetted you should look at the work going on with IronRuby since they have good integration with the .NET framework overall and with Silverlight, in the event you want to do apps that can bridge web and desktop. At this point IronRuby can be used to develop for Windows Presentation Foundation (WPF) or WinForms.
For cross-platform you have Ruby bindings for QT, FOX and others.
You should look at IronRuby - WPF and windows forms are both supported:

Resources