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

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.

Related

Are there any plans for a native windows version of NodeJs?

I'm wondering if anyone has any information or speculation as to when or if there will be a native windows version/port of Node.js.
There is an ongoing effort to provide a mingw port of Node.js. Version 0.3.6+ can be build that way.
However that is still experimental and anything but ready for more than quick and dirty development. Even in case this version matures, I suppose that it will always lag behind the *nix versions, mainly due to the fact that the event loop implementations that Node uses were originally written for those systems and APIs.
The windows version may become stable for development at some point in the future, but I hardly doubt it will ever be usable for production.
July 2011 Update:
#nodejs v0.5.1 is the first to ship with an official Windows executable. We're hoping to get some good feedback.
Microsoft has officially gotten involved with joyent in making node.js work natively on windows.
If one or two Windows C++ developers would put in the effort, then they could fill the gaps in the native Windows version and produce a node.js implementation that would be usable for production.
For now, there is a working Cygwin version and I don't know of any testing that shows it to be unsuitable for production. It certainly works fine (version 0.5.0pre) for development.
Have a look at:
http://www.rafaljonca.org/d/nodejs-windows
Which is based on the work of these guys here
http://node-js.prcn.co.cc/
Both good ways of getting node on windows if you dont have cygwin. However after many heartaches I found developing Node stuff on windows easiest by just using virtualbox with the ubuntu image.
Tnx
GT
I am strictly a Windows Dev and I have wanted to mess around with Node.js for quite a while.
It looks like Microsoft, Rackspace.com and the Node.js team are planning on working together port Node.js to Windows.
So, it's not hear yet but it should be soon. w00t!
The Official Node.js Blog
The first stable version has been released: Release details here.
Be sure to check for the latest version as the link above will go out of date.

How reliable is JRuby?

I'm interested in promoting JRuby in our office as the platform hosting Rails applications.
But how reliable is it?
Is its performance better than MRI 1.8.7?
JRuby 1.5 states that it is 100% compatible with Ruby 1.8.7, does this mean that JRuby can run any Ruby/Rails code?
Yes, JRuby is reliable! Oracle uses JRuby for Oracle mix (http://mix.oracle.com/), Sun had used it for Kenai (http://kenai.com), and it's gonna be the next base for java.net (from kenai site: "Work is on-going for migrating the Java.net domain over to the Kenai infrastructure")!!
You can run almost every code, some gems uses native C extension and in JRuby there's a primitive support to it, but yes...rails just works.
You can deploy Rails apps in Application Servers like Tomcat or JBoss with Warbler that wraps Rails apps inside a .war file, it's pretty awesome!
update: you can see a lot of benchmarks here: http://programmingzen.com/2010/07/19/the-great-ruby-shootout-july-2010/
I am doing a lot of jruby work right now and can tell you that rails is certainly a viable option under the jruby interpreter. I've been pretty pleased and in my case have to use many native Java libraries, so jRuby is just such an awesome wrapper around that java code. I will say that I have had some technical challenges some that are worked out, some that are not yet.
unit testing: spooling up the jvm and then spooling up rails takes much longer, so your tests take longer to run - solution, potentially something like nailgun that keeps the jvm running
deployment: i have not gotten warbler to work for me, with my flavor of tomcat. this is a major issue for us.
pick your libraries, while some c extensions work, they are not all equally compatible.
if you are interested I would highly reccomend the jruby book, in beta, from Pragmantic Programmers at http://pragprog.com
JRuby rocks!! The simple reason being its portability features and integration with Java libraries. I personally use it with Netbeans and the fast debugger that comes with that seems very handly. Plus you do not want to see that native build errors and handling them. All these gems that you download for JRuby work 100% across any platform. With JRuby, you are simply bringing in the advantages of the Java's Platform independence.
Moreover, JRuby uses native threading which uses OS threads instead of Green threads as in CRuby (i think its not the case with the latest versions though)
In Gist, go JRuby!!
for windows I have found it to be much more stable than MRI when working with larger amounts of data. There are some bugs on windows still but they are actually work-around-able. Recommend.
Disclaimer: I don't use jruby in my day job - I merely experimented with running existing code using jruby.
It doesn't mean that it'll run all code successfully. For example, bioruby currently calls fork on jruby even though jruby doesn't really support it. (That's more of a bug in bioruby than a bug in jruby though)
I wouldn't call such behaviour "unreliable" though. It's fail-safe, like a plane that would not get off the ground, much less crash.

Using Ruby on Windows Mobile Devices

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).

Is it possible to use jruby to write an applet or is it better to use iron ruby for silverlight?

If I wanted to dabble with ruby, would it be easier to write an applet in Jruby or a Silverlight XAP with iron ruby?
So far all I have is a vague idea that it might be possible.
Firstly, if you want to dabble with Ruby the language i'd just download the windows installer, plenty of resources in that.
If it's specifically applets you want to look at check out the recently released Gestalt, allows you to run Ruby in the browser (needs Silverlight) http://visitmix.com/labs/gestalt/getstarted/
I'd suggest this is one of those happy "it depends" things. Some questions to consider that may help you clarify your thinking:
Which environment do you know better?
What are your target environment(s)?
Are you happy to run a not-yet-1.0 version (IronRuby?)
Can you get both (either) to run in your development environment?
How much (any?) support/prior art available?
I have a nagging feeling this may need to go beyond "dabbling" ;-)
I'd go with jruby because:
Jruby is more mature than IronRuby
Applets are more mature than Silverlight
I like open source and hate MS (hate silverlight not IronRuby, respect for IR devs)
Java libs galore
But if u already know a lot about .NET mabe IronRuby
Not everyone can use Silverlight, Java seems to be available (and preinstalled) on more platforms at the moment, so I would go with JRuby.

Developing in Ruby, on a Windows machine, is too counter productive?

It seems to be very counter productive in that so many gems will break on windows. I have been dealing with so many mysql and ruby-mysql gem problems (seg faults occuring in the gem itself, a class called UnixSocket apparently doesn't work well on windows machines, etc etc).
I'm I just wasting my time here? Should I move onto a different scripting language?
I have very little experience with Ruby on Windows but when I was starting with Ruby I was on Windows and I got the general impression that it wasn't a Windows-native system.
So after many years of using primarily Windows, getting into Ruby prompted me to switch back to my original system, Unix, this time to Linux. Ruby did run with less hassle and running bash in its native environment was better than the just-mostly-OK Cygwin. I was happy.
Then my new employer had me switch to the Mac. Now I'm really spoiled, but really happy.
I realize this is subjective but ISTM that Linux was a lot better than windows and the Mac is a lot better than Linux. I could still run Windows in VMWare Fusion if I wanted to, but I don't. I do have some Linux VM's.
I think what I'm really trying to say is that there is a reason Ruby isn't best deployed on Windows. The kind of people who run Ruby are .. I'm trying to think of a non-pejorative word here .. not likely to be found on Windows.
So this is a turning point for you. Yes, .net is a sophisticated and well-documented environment, yes, windows has been reliable for several years now, and yes, it's a respectable system at this point. Yes, it runs Stack Overflow and some of the gurus are Windows guys. But it's just kind of a litmus test for .. darn, missing that word again ..
A lot of people run Windows because they just don't know what else to run. Linux is a good alternative if you have to buy the system yourself. And if you or your employer can afford it, the (Unix-underneath) Mac gives you everything Linux does plus the Mac-specific world.
It's time to choose... :-)
I've been developing with Ruby on Windows for several years, including building and deploying "enterprise" intranet Rails apps running against Oracle, MySQL and SQLServer on both Windows and Solaris servers.
Agreed, there are a few gems that have compiled components whose authors have not built Windows versions - that's OK, it's an open-source platform and they don't have to if they don't want to. Similarly, you're perfectly entitled to (a) ignore libraries that don't have mswin32 or mingw32 versions or (b) give something back by compiling them yourself!
As for the MySQL gem, IIRC on Windows you need the "pure Ruby" adaptor, which does not use the MySQL C API: http://github.com/tmtm/ruby-mysql or gem install ruby-mysql
I don't think you're wasting your time. I've worked with two guys who've done extensive projects on Ruby on Rails apps using Windows XP, like major, long-term projects. They seem to not mind it at all. They both worked on it using the NetBeans IDE. (It has a Ruby-specific version.)
I tried it myself when I first got started with Ruby and didn't run into a lot of errors or problems with gems, though there were some things that worked awkwardly. Usually there was a workaround.
I decided that I greatly preferred using OS X or CentOS Linux for Ruby development. But I know for a fact that working on Windows is possible.
One thing to look out for is that 90% of the Ruby community is on OS X and deploys to Linux, so you'll get more help if you're on one of those OSs.
Another thing to look out for is that the whole Ruby universe and culture is very oriented towards the Unix command line using the bash shell. All your tutorials and stuff are going to kind of assume that. They're going to have instructions like "Go to the shell and run # rake db:migrate and it will be a lot easier to follow those instructions if you have a full-featured shell with command completion, command history, etc. So if you want to work on Windows you might look into installing something like MinGW.

Resources